comparison gui/skin/cut.h @ 32811:b34b8e47a844

Prevent out buffer overflow.
author ib
date Sun, 13 Feb 2011 17:58:02 +0000
parents 9e739bdb049c
children b72f64598fe6
comparison
equal deleted inserted replaced
32810:9d5519459be8 32811:b34b8e47a844
17 */ 17 */
18 18
19 #ifndef MPLAYER_GUI_CUT_H 19 #ifndef MPLAYER_GUI_CUT_H
20 #define MPLAYER_GUI_CUT_H 20 #define MPLAYER_GUI_CUT_H
21 21
22 void cutItem( char * in, char * out, char sep, int num ); 22 #include <stddef.h>
23
24 #define cutItem(in, out, sep, num) cutItemString(in, out, sep, num, sizeof(out))
25
26 void cutItemString( char * in, char * out, char sep, int num, size_t maxout );
23 int cutItemToInt( char * in, char sep, int num ); 27 int cutItemToInt( char * in, char sep, int num );
24 float cutItemToFloat( char * in, char sep, int num ); 28 float cutItemToFloat( char * in, char sep, int num );
25 void cutChunk( char * in, char * s1 ); 29 void cutChunk( char * in, char * s1 );
26 30
27 #endif /* MPLAYER_GUI_CUT_H */ 31 #endif /* MPLAYER_GUI_CUT_H */