> > I guess the issue is that the original patch replaces prot_printf > implementation to rely on vsnprintf with a fixed-size (2048 bytes) buffer. > So if any part of cyrus has to write a string (%s) which size is over > 2048 characters (actually less than that, since there is the nul-byte > ending and possibly extra data to take into account in the format), the > output is truncated. This is to compare to the original code of > prot_printf which sends the string as-is when if parses '%s' in the > format. > > The revised version of the patch is not really ideal either, since it > introduces a second prot_printf function only to take care of the root UIDL > issue related to Outlook.
But it shouldn't break nothing isn't it?... perhaps it's not the most "beautiful" way of solving the problem... but Julien, don't you think it could solve the problem?... well I have noticed have forgotten to write the function prototype too... although has worked... I assume gcc is more clever than we normally think :)... but apart of this and setting the prototype properly... it should work properly, don't you think?? The current code do already use snprintf to > format some data (integers etc), so I would say that extending it to > recognize formats such as '%#.#d' (that is integer and the likes with > minimum field width and/or precision) could be a solution to have the > Outlook UIDL patch use the > prot_printf function without breaking anything else. But of course it's > easier said than done ;) I will try to write this... yep.... Yeah... really the ideal solution would be to recognize those formats through prot_printf.... > > Julien > >