[BusyBox 0004364]: od/dump.c - uninitialized read
bugs at busybox.net
bugs at busybox.net
Mon Jul 28 17:00:46 PDT 2008
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=4364
======================================================================
Reported By: cristic
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 4364
Category: Documentation
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 07-27-2008 22:44 PDT
Last Modified: 07-28-2008 17:00 PDT
======================================================================
Summary: od/dump.c - uninitialized read
Description:
echo A >A && od A
may read uninitialized memory.
The problem is in function get() in dump.c:
- dump.c:385 -> the buffer dumper->get__savp is created by calling
xmalloc()
- dump.c:405 -> when this line is hit in the second iteration through
the while(1) loop, the buffer dumper->get__curp contains
"A",
but the buffer dumper->get__savp is still uninitialized.
Thus the memcmp call on this line will read uninitialized
data.
I think the fix is really easy: just replace xmalloc() with xzalloc() at
dump.c:385
--Cristian
======================================================================
----------------------------------------------------------------------
cristic - 07-27-08 22:46
----------------------------------------------------------------------
P.S. The bug is obviously not in "Documentation", but I don't seem to be
able to edit that field now.
----------------------------------------------------------------------
vda - 07-28-08 17:00
----------------------------------------------------------------------
Fixed, thanks!
Issue History
Date Modified Username Field Change
======================================================================
07-27-08 22:44 cristic New Issue
07-27-08 22:44 cristic Status new => assigned
07-27-08 22:44 cristic Assigned To => BusyBox
07-27-08 22:45 cristic Issue Monitored: cristic
07-27-08 22:46 cristic Note Added: 0010064
07-28-08 17:00 vda Status assigned => closed
07-28-08 17:00 vda Note Added: 0010134
======================================================================
More information about the busybox-cvs
mailing list