On Tue, 12 May 2009 13:55:30 +0200
Adam Tkac <at...@redhat.com> wrote:

> On Tue, May 12, 2009 at 01:24:09PM +0200, Peter Åstrand wrote:
> >
> > Why does it work with shorter passwords?
> 
> Currently rfb::PlainPasswd::PlainPasswd(const struct rfb::ObfuscatedPasswd &)
> constructor is used. It allocates space for 9 chars so 9-chars
> passwords are OK.
> 
> I didn't inspected why 11-chars passwd is still OK but I expect that glibc
> allocates little bigger buffer than 9 chars or memory which is right
> after the buffer is not used at all (so overflow doesn't matter).
> 

Memory allocations are 32-bit aligned (on x86), hence it will allocate
12 bytes if you ask for 9.

Rgds
-- 
Pierre Ossman            OpenSource-based Thin Client Technology
System Developer         Telephone: +46-13-21 46 00
Cendio AB                Web: http://www.cendio.com

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to