[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Full-Disclosure] LOL, stupid calife maintainer - this can't be true
- To: Timothy Demulder <timothy.demulder@xxxxxxxxxx>
- Subject: Re: [Full-Disclosure] LOL, stupid calife maintainer - this can't be true
- From: Michal Zalewski <lcamtuf@xxxxxxxxxxx>
- Date: Sat, 28 Feb 2004 18:14:47 +0100 (CET)
On Sat, 28 Feb 2004, Timothy Demulder wrote:
>> user_pass = (char *) xalloc (l_size);
>> pt_pass = (char *) getpass ("Password:");
>> strcpy (user_pass, pt_pass); // <- BAD CODE
>
> It's just plain sad, there should be capital punishement for people who
> code like this.
Uhh... sure... except that, quoting man getpass on Linux:
The password may be up to 128 characters in length,
including a trailing NUL. Any additional characters and
the terminating newline character are discarded.
Unlike many other systems, however, Linux in fact DOES NOT obey this
limit, and returns more. Technically speaking, this is a specification
(standards compliance?) problem in Linux - although this guy most
definitely could be more careful.
--
------------------------- bash$ :(){ :|:&};: --
Michal Zalewski * [http://lcamtuf.coredump.cx]
Did you know that clones never use mirrors?
--------------------------- 2004-02-28 18:08 --
http://lcamtuf.coredump.cx/photo/current/
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.netsys.com/full-disclosure-charter.html