bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: __asprintf buffer resize issue


From: Ulrich Drepper
Subject: Re: __asprintf buffer resize issue
Date: 27 Jul 2001 12:06:24 -0700
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.2 (Thelxepeia)

Michael Meeks <address@hidden> writes:

>       When printing a certain set of strings, there appears to be a
> buffer overflow issue in glibc's __asprintf implementation.

First, *never* use any symbol with a leading underscore unless it is
explicitly allowed by a standard.  The missing prototype is a clear
hint.  You might very well find that the semantics of __ protected
symbols suddenly changes or they go away completely.

Second, there was a problem with the asprintf function copying too
many bytes.  The target buffer was fine, but the source didn't have
that much content.  I've checked in a patch for 2.2.4.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]