Description of problem:
compiler warning: call ... will always overflow destination buffer.
indeed, there is a trivial bug in the code, no space is reserved for trailing \0.
patch to fix:
--- libytnef-1.5/ytnef.c 2004-08-26 17:09:05.000000000 +0000
+++ libytnef-1.5/ytnef.c 2012-06-08 19:34:07.826123387 +0000
@@ -1327,7 +1327,7 @@
ULONG compressedSize, uncompressedSize, magic, crc32;
comp_Prebuf.size = strlen(RTF_PREBUF);
- comp_Prebuf.data = calloc(comp_Prebuf.size, 1);
+ comp_Prebuf.data = calloc(comp_Prebuf.size+1, 1);
strcpy(comp_Prebuf.data, RTF_PREBUF);
src = p->data;
Version-Release number of selected component (if applicable):
libytnef-1.5-7.fc17