Summary: | net-misc/telnet-bsd fails to compile with format-security | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Uwe Sauter <uwe> |
Component: | Current packages | Assignee: | Marc Schiffbauer <mschiff> |
Status: | RESOLVED NEEDINFO | ||
Severity: | normal | CC: | xmw |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
net-misc:telnet-bsd-1.2-r1:20150324-205457.log
obvious format security patch |
Description
Uwe Sauter
2015-03-24 20:58:38 UTC
Created attachment 399668 [details]
net-misc:telnet-bsd-1.2-r1:20150324-205457.log
build log
Created attachment 409420 [details, diff]
obvious format security patch
I'm gonna write up another one, replacing this char* + int construct with an if statement
case ENV_VAR:
if (pointer[1] == TELQUAL_SEND)
goto def_case;
- netoprintf("\" VAR " + noquote);
+ netoprintf("%s", "\" VAR " + noquote);
noquote = 2;
break;
could be
case ENV_VAR:
if (pointer[1] == TELQUAL_SEND)
goto def_case;
- netoprintf("\" VAR " + noquote);
+ if (! noquote) netoprintf("%s", "\" ");
+ netoprintf("%s", "VAR ");
noquote = 2;
break;
Hi Michael, thanks for the patch! What about the second one? When I apply your first patch it compiles fine for me.. TIA |