Bug 35016

Summary: Program can't handle a null character
Product: [Retired] Red Hat Linux Reporter: edward_blazek
Component: ucd-snmpAssignee: Matt Wilson <msw>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: high    
Version: 7.1CC: edward_blazek, john_hull, msw
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
URL: UCD-SNMP
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-09-04 15:53:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
bad patch
none
Good patch none

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.