[pdftex] compiling 1.30.6 on openbsd-current
holop ferenc
fred at pentacom.sk
Tue Mar 7 15:59:49 CET 2006
hmm, gnwiii at gmail.com said that
> Pdftex is now being used 'invisibly' in production environments and no
> doubt web services for things like cropping pdf images/figures (and by
> people who have never heard of TeX), so some people building/using
> pdfTeX need to be more careful about buffer overflows, etc.
>
> In version 1.40 beta you can avoid these warnings if you use a c99
> compiler (e.g., gcc -std=c99 ...). For example,
> web2c/pdftexdir/utils.c was changed
> to use vnsprintf if the __STDC_VERSION__ >=199901L:
>
> void pdf_printf (const char *fmt, ...)
> {
> va_list args;
> va_start (args, fmt);
> #if defined (__STDC_VERSION__) && __STDC_VERSION__ >=199901L
> vsnprintf (print_buf, PRINTF_BUF_SIZE,
> #else
> vsprintf (print_buf,
> #endif
> fmt, args);
> pdf_puts (print_buf);
> va_end (args);
> }
me no C guru, but couldn't this be solved using configure?
i mean use vsnprintf and all the "n" functions and if the
build system does not have it use a stub function defined
in the source? seems like an overkill to modify the sources
in every place like this. also, #ifdef's are harder to debug
and maintain (for me that is :).
i would like to see these functions as the default compiled
in and not a special case invoked by extra compiler parameters.
-f
--
More information about the pdftex
mailing list