Bug 35016 - Program can't handle a null character
Summary: Program can't handle a null character
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ucd-snmp
Version: 7.1
Hardware: i686
OS: Linux
high
medium
Target Milestone: ---
Assignee: Matt Wilson
QA Contact: Brock Organ
URL: UCD-SNMP
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-06 14:34 UTC by edward_blazek
Modified: 2007-03-27 03:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-09-04 15:53:28 UTC
Embargoed:


Attachments (Terms of Use)
bad patch (657 bytes, patch)
2001-09-04 15:50 UTC, Mark Rusk
no flags Details | Diff
Good patch (658 bytes, patch)
2001-09-04 15:51 UTC, Mark Rusk
no flags Details | Diff

Description edward_blazek 2001-04-06 14:34:20 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

Dell would like to see this patch added to 7.1

The basic fix is to patch ucd-snmp/pass.c as follows:
407,408c407,410
<           if (bin2asc(buf2, var_val_len) ==
(int)var_val_len)
<               sprintf(buf,"string %s",buf2);
---
>           if (var_val_len == 0)
>               sprintf(buf,"string
\"\"");
>           else if (bin2asc(buf2, var_val_len) ==
(int)var_val_len)
>               sprintf(buf,"string
\"%s\"",buf2);

Net-snmp has had a chance to reproduce provide the above fix and include 
this fix into their tree.  The request is for RedHat to include this patch 
as part of their 7.1 releases.


Also information from sourceforge is provided below:
http://sourceforge.net/tracker/index.php?func=detail&aid=40672

EAB

Reproducible: Always
Steps to Reproduce:
1. See code patch
2.
3.

Comment 1 Matt Wilson 2001-04-06 14:58:47 UTC
I've built ucd-snmp-4.2-12 and have submitted it for approval.


Comment 2 Preston Brown 2001-04-06 19:30:50 UTC
approved this morning.


Comment 3 Mark Rusk 2001-09-04 15:50:40 UTC
Created attachment 30834 [details]
bad patch

Comment 4 Mark Rusk 2001-09-04 15:51:39 UTC
Created attachment 30835 [details]
Good patch

Comment 5 Mark Rusk 2001-09-04 15:53:23 UTC
Note that the bad (current patch) has a printf(buf,"string\"\""); which should
be a sprintf (good patch)

Comment 6 Preston Brown 2001-09-04 20:03:35 UTC
corrected in 4.2.1-7 and later.



Note You need to log in before you can comment on or make changes to this bug.