[BusyBox 0004214]: printf reads uninitialized memory
bugs at busybox.net
bugs at busybox.net
Fri Jul 18 11:42:15 PDT 2008
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=4214
======================================================================
Reported By: cristic
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 4214
Category: Other
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
======================================================================
Date Submitted: 07-17-2008 16:37 PDT
Last Modified: 07-18-2008 11:42 PDT
======================================================================
Summary: printf reads uninitialized memory
Description:
Hello, here is a test case that leads printf to read uninitialized memory:
./printf "%Ld\n" 10
39860182724902922
(output varies, since it reads garbage)
The problem is that this execution eventually invokes libc's printf with
the same format specifier, and with the second argument my_xstrtol("10").
This returns a long (4 bytes on my machine), which is printed as a long
long
(8 bytes on my machine). Unfortunately, I don't see an easy fix here,
because most conversion routines in Busybox seem to return longs.
--Cristian
======================================================================
----------------------------------------------------------------------
vda - 07-18-08 11:42
----------------------------------------------------------------------
Indded. Please test 6.patch.
Issue History
Date Modified Username Field Change
======================================================================
07-17-08 16:37 cristic New Issue
07-17-08 16:37 cristic Status new => assigned
07-17-08 16:37 cristic Assigned To => BusyBox
07-17-08 16:37 cristic Issue Monitored: cristic
07-18-08 11:40 vda File Added: 6.patch
07-18-08 11:42 vda Note Added: 0009754
======================================================================
More information about the busybox-cvs
mailing list