Changeset f62ada21e1e0a59b9ac8c715387a561c5b580578
- Timestamp:
- 11/28/05 10:26:56
(3 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1133170016 +0000
- git-parent:
[ed7d46886576b5e1419b3222433f12bcf1fe702d]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1133170016 +0000
- Message:
Use strdup() instead of malloc()/sprintf(), and fix off-by-one overflow
Please test.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r64595f0 |
rf62ada2 |
|
| 5 | 5 | * $Id$ |
|---|
| 6 | 6 | * |
|---|
| 7 | | * Authors: Lo�Minier <lool@videolan.org> |
|---|
| | 7 | * Authors: Loïc Minier <lool@videolan.org> |
|---|
| 8 | 8 | * |
|---|
| 9 | 9 | * This program is free software; you can redistribute it and/or modify |
|---|
| … | … | |
| 233 | 233 | if( p_playlist->status.i_status == PLAYLIST_STOPPED ) |
|---|
| 234 | 234 | { |
|---|
| 235 | | psz_display = (char *)malloc( sizeof(char )*strlen(_("Stop"))); |
|---|
| 236 | | sprintf( psz_display,_("Stop") ); |
|---|
| | 235 | psz_display = strdup(_("Stop")); |
|---|
| 237 | 236 | vlc_object_release( p_playlist ); |
|---|
| 238 | 237 | } |
|---|
| 239 | 238 | else if( p_playlist->status.i_status == PLAYLIST_PAUSED ) |
|---|
| 240 | 239 | { |
|---|
| 241 | | psz_display = (char *)malloc( sizeof(char )*strlen(_("Pause"))); |
|---|
| 242 | | sprintf( psz_display,_("Pause") ); |
|---|
| | 240 | psz_display = strdup(_("Pause")); |
|---|
| 243 | 241 | vlc_object_release( p_playlist ); |
|---|
| 244 | 242 | } |
|---|