DragonFly BSD
 

Issue1067

Title asf patch
Priority bug Status resolved
Superseder Nosy List eric.j.christeson
Assigned To Topics

Created on 2008-07-10.21:37:31 by eric.j.christeson, last changed 2008-08-19.12:11:15 by matthias.

Messages
msg5268 (view) Author: matthias Date: 2008-08-19.12:11:15
Committed by dillon@
msg4931 (view) Author: dillon Date: 2008-07-14.00:13:02
:..
:>            quad_t bssaddr;
:>
:>            tokens = tokenize(buf, token, MAXTOKEN);
:> +           if (tokens <= 1)
:> +               continue;
:>            base = strtoll(token[2], NULL, 16);
:>            if (!dofind) {
:>                snprintf(ocbuf,
:>

    I've committed it.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>
msg4929 (view) Author: nthery Date: 2008-07-13.22:44:03
The patch looks fine.
msg4919 (view) Author: eric.j.christeson Date: 2008-07-10.21:37:13
asf(8) dumps core if you give it '\n' as input.  More specifically, if
it has less than 2 tokens.
Patch attached.
Thanks to Antonio Huete Jimenez for getting me interested in this.

Index: usr.sbin/asf/asf.c
===================================================================
RCS file: /home/dcvs2/src/usr.sbin/asf/asf.c,v
retrieving revision 1.5
diff -u -r1.5 asf.c
--- usr.sbin/asf/asf.c  19 May 2008 10:13:08 -0000      1.5
+++ usr.sbin/asf/asf.c  10 Jul 2008 21:26:11 -0000
@@ -254,6 +254,8 @@
            quad_t bssaddr;

            tokens = tokenize(buf, token, MAXTOKEN);
+           if (tokens <= 1)
+               continue;
            base = strtoll(token[2], NULL, 16);
            if (!dofind) {
                snprintf(ocbuf,
History
Date User Action Args
2008-08-19 12:11:15matthiassetpriority: bug
status: chatting -> resolved
messages: + msg5268
2008-07-14 00:13:05dillonsetmessages: + msg4931
2008-07-13 22:44:05ntherysetstatus: unread -> chatting
messages: + msg4929
2008-07-10 21:37:31eric.j.christesoncreate