[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: glibc's snprintf is a pig; fix or replace ?
From: |
Jim Meyering |
Subject: |
Re: glibc's snprintf is a pig; fix or replace ? |
Date: |
Sat, 06 Nov 2010 22:19:11 +0100 |
Jim Meyering wrote:
> Did you know that glibc's snprintf can fail due to ENOMEM?
FYI, this is because glibc's snprintf is a thin
wrapper around vasnprintf, and as its name implies,
that latter may well allocate heap storage.
However, "fixing" this problem in glibc would mean adapting
or cloning the 5000+ lines of vasnprintf.c (already littered
with well-nested #ifdefs), and neither prospect is inviting.