Bug 35016 - Program can't handle a null character
Program can't handle a null character
Product: Red Hat Linux
Classification: Retired
Component: ucd-snmp (Show other bugs)
i686 Linux
high Severity medium
: ---
: ---
Assigned To: Matt Wilson
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2001-04-06 10:34 EDT by edward_blazek
Modified: 2007-03-26 23:43 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-09-04 11:53:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description edward_blazek 2001-04-06 10:34:20 EDT
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:
<           if (bin2asc(buf2, var_val_len) ==
<               sprintf(buf,"string %s",buf2);
>           if (var_val_len == 0)
>               sprintf(buf,"string
>           else if (bin2asc(buf2, var_val_len) ==
>               sprintf(buf,"string

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:


Reproducible: Always
Steps to Reproduce:
1. See code patch
Comment 1 Matt Wilson 2001-04-06 10:58:47 EDT
I've built ucd-snmp-4.2-12 and have submitted it for approval.
Comment 2 Preston Brown 2001-04-06 15:30:50 EDT
approved this morning.
Comment 3 Mark Rusk 2001-09-04 11:50:40 EDT
Created attachment 30834 [details]
bad patch
Comment 4 Mark Rusk 2001-09-04 11:51:39 EDT
Created attachment 30835 [details]
Good patch
Comment 5 Mark Rusk 2001-09-04 11:53:23 EDT
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 16:03:35 EDT
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.