Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130320190249.GQ20323@brightrain.aerifal.cx>
Date: Wed, 20 Mar 2013 15:02:50 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Weird bug in syslog

On Wed, Mar 20, 2013 at 01:41:26PM +0100, Szabolcs Nagy wrote:
> >  	l2 = vsnprintf(buf+l, sizeof buf - l, message, ap);
> >  	if (l2 >= 0) {
> >  		l += l2;
> 
> these are int values
> maybe we should care about overflow
> (eg making l size_t works)

Not needed. snprintf returns int. But it *can* fail: EOVERFLOW.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.