ECToo / xdelta

Automatically exported from code.google.com/p/xdelta
0 stars 0 forks source link

vsnprintf portability #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Win32 vsnprintf returns -1 upon truncation, therefore the overflow
checks of xdelta on windows are not reliable.

What version of the product are you using? On what operating system?
- svn-207/208 on linux, win32, djgpp

Please provide any additional information below.

The attached patch provides more portability, I think. Even with that,
there are still non-C99-compliant vsnprintf implementations out there..

Regards,
Ozkan

Original issue reported on code.google.com by seze...@gmail.com on 6 Dec 2007 at 12:09

Attachments:

GoogleCodeExporter commented 9 years ago
It seems like I attached a a bad / old version of the patch, sigh..
Correct one is attached.

Regards.

Original comment by seze...@gmail.com on 6 Dec 2007 at 1:03

Attachments:

GoogleCodeExporter commented 9 years ago
SVN 214.  Please let me know if this works.

Original comment by josh.mac...@gmail.com on 14 Dec 2007 at 9:12

GoogleCodeExporter commented 9 years ago
I thintk this was missed in xdelta3-main.h:

-#define VC do { if (((ret = snprintf 
+#define VC do { if (((ret = snprintf_func

Thanks,
Ozkan

Original comment by seze...@gmail.com on 14 Dec 2007 at 11:12

GoogleCodeExporter commented 9 years ago
SVN 218. :)

Original comment by josh.mac...@gmail.com on 14 Dec 2007 at 11:24

GoogleCodeExporter commented 9 years ago
Compiles fine, thanks.

Original comment by seze...@gmail.com on 14 Dec 2007 at 11:33