logo       

Re: patch to login, dmesg and obscure: msg#00254

linux.busybox

Subject: Re: patch to login, dmesg and obscure


Hi again.

> Yipe! strcat(wrapped, wrapped) is very evil!
> safe_strncpy(wrapped + lenwrap, wrapped, lenwrap + 1);

Looking at the issue in libbb/obscure.c:password_check(), I think there's
still an error in 1.00-pre2. The handpatch by Vladimir copies too much data,
the source string ain't that long which the SIZE argument to strncpy() say.




> But your lenold new variable and recalculate lenght is not require.

OK, since optimization seems to be what is wanted... This patch fixes what
Vladimir missed, AND does some optimization too. :) Reduction of one
str_lower() and two bzero() calls, which was unecessary. (Could use a second
opinion though).


/Ronny




Attachment: bbpre2.diff
Description: Text document

_______________________________________________
busybox mailing list
busybox@xxxxxxxxxxxxxxxx
http://codepoet.org/mailman/listinfo/busybox
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise