Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 36457 Details for
Bug 58633
"Stack smashing attack in if_readlist_proc()" from ifconfig
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch against debian testing 1.60-10, for Bernd
net-tools-deb.patch (text/plain), 1.58 KB, created by
Kevin F. Quinn (RETIRED)
on 2004-07-30 02:23:43 UTC
(
hide
)
Description:
patch against debian testing 1.60-10, for Bernd
Filename:
MIME Type:
Creator:
Kevin F. Quinn (RETIRED)
Created:
2004-07-30 02:23:43 UTC
Size:
1.58 KB
patch
obsolete
>diff -ur net-tools-1.60-10/lib/interface.c net-tools-1.60/lib/interface.c >--- net-tools-1.60-10/lib/interface.c 2004-07-30 10:24:34.420142616 +0200 >+++ net-tools-1.60/lib/interface.c 2004-07-30 10:34:07.870964840 +0200 >@@ -212,31 +212,34 @@ > > char *get_name(char *name, char *p) > { >- while (isspace(*p)) >- p++; >- while (*p) { >- if (isspace(*p)) >- break; >- if (*p == ':') { /* could be an alias */ >- char *dot = p++; >- while (*p && isdigit(*p)) p++; >- if (*p == ':') { >- /* Yes it is, backup and copy it. */ >- p = dot; >- *name++ = *p++; >- while (*p && isdigit(*p)) { >- *name++ = *p++; >- } >- } else { >- /* No, it isn't */ >- p = dot; >- } >- p++; >- break; >+ /* Extract <name>[:<alias>] from nul-terminated p where p matches >+ <name>[:<alias>]: after leading whitespace. >+ If match is not made, set name empty and return unchanged p */ >+ int namestart=0, nameend=0, aliasend; >+ while (isspace(p[namestart])) >+ namestart++; >+ nameend=namestart; >+ while (p[nameend] && p[nameend]!=':' && !isspace(p[nameend])) >+ nameend++; >+ if (p[nameend]==':') { >+ aliasend=nameend+1; >+ while (p[aliasend] && isdigit(p[aliasend])) >+ aliasend++; >+ if (p[aliasend]==':') { >+ nameend=aliasend; >+ } >+ if ((nameend-namestart)<IFNAMSIZ) { >+ memcpy(name,&p[namestart],nameend-namestart); >+ name[nameend-namestart]='\0'; >+ p=&p[nameend]; >+ } else { >+ /* Interface name too large */ >+ name[0]='\0'; > } >- *name++ = *p++; >+ } else { >+ /* first ':' not found - return empty */ >+ name[0]='\0'; > } >- *name++ = '\0'; > return p; > } >
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 58633
:
36375
|
36376
|
36377
|
36378
|
36388
|
36449
|
36457
|
37588