View Single Post

   
  #2 (permalink)  
Old 04-16-2008, 02:00 AM
Ludek Finstrle
 
Posts: n/a
Default Re: Patch for snprintf problem (bug #1000650)

> I solve it this way (main idea):
> snprintf(buf + strlen(buf), " append");


Ugh typo mistake:

snprintf(buf + strlen(buf), sizeof(buf), " append");

My hands are faster than my head :-(
There is buffer overrun erron becouse I have to decrease sizeof(buf) with
strlen(buf).

So I attach second try of this patch againist CVS HEAD.

Comments are welcome

Luf


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Reply With Quote