From: David B. <dc...@ho...> - 2013-05-31 17:33:27
|
Hello there, I just got the GNU C compiler to say this In function 'int sprintf(char*, const char*, ...)', inlined from 'char* APar_ExtractDataAtom(int)' at AtomicParsley.cpp:1833:97: /usr/include/bits/stdio2.h:34:43: warning: call to int __builtin___sprintf_chk(char*, int, long unsigned int, const char*, ...) will always overflow destination buffer [enabled by default] __bos (__s), __fmt, __va_arg_pack ()); ^ Source code is char* result = (char*) malloc(sizeof(char) * 12); sprintf(result, "Unknown (%u)\n", UInt32FromBigEndian(data_payload)); Suggest change 12 to 20 or 30. Regards David Binderman |