FreeBSD Bugzilla – Attachment 236591 Details for
Bug 258570
bsnmpwalk can crash due to bug in snmp_parse_resp()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix for the bsnmpwalk crash
bsnmpwalk-crash.patch (text/plain), 946 bytes, created by
Shteryana Shopova
on 2022-09-16 13:05:21 UTC
(
hide
)
Description:
Proposed fix for the bsnmpwalk crash
Filename:
MIME Type:
Creator:
Shteryana Shopova
Created:
2022-09-16 13:05:21 UTC
Size:
946 bytes
patch
obsolete
>diff --git a/usr.sbin/bsnmpd/tools/bsnmptools/Makefile b/usr.sbin/bsnmpd/tools/bsnmptools/Makefile >index 09280a48a3b5..4232731b278f 100644 >--- a/usr.sbin/bsnmpd/tools/bsnmptools/Makefile >+++ b/usr.sbin/bsnmpd/tools/bsnmptools/Makefile >@@ -9,7 +9,7 @@ PROG= bsnmpget > > LIBADD= bsnmp bsnmptools > >-CFLAGS+= -I${.CURDIR:H}/libbsnmptools >+CFLAGS+= -g -I${.CURDIR:H}/libbsnmptools > LDFLAGS+= -L${.OBJDIR:H}/libbsnmptools > > LINKS= ${BINDIR}/bsnmpget ${BINDIR}/bsnmpwalk >diff --git a/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c b/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c >index cc8cc33511cf..9219e1544ac8 100644 >--- a/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c >+++ b/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c >@@ -504,7 +504,7 @@ snmptool_walk(struct snmp_toolinfo *snmptoolctx) > > outputs += rc; > >- if ((u_int)rc < resp.nbindings) { >+ if ((u_int)rc < resp.nbindings || resp.nbindings == 0) { > snmp_pdu_free(&resp); > break; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 258570
:
227978
| 236591