Re: Privilege-escalation attacks on NT-based Windows are unfixable
From: Leythos (void@nowhere.com)Date: 08/25/02
- Next message: NeoSadist: "Re: How to install Security updates?"
- Previous message: Alexander Lysenko: "analusis security in win2000"
- In reply to: Tore Lund: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Next in thread: Edward Elliott: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Leythos <void@nowhere.com> Date: Sun, 25 Aug 2002 12:16:52 GMT
In article <akaaui$1ghq87$1@ID-124507.news.dfncis.de>,
toreld@netscape.net says...
> Edward Elliott wrote:
> > Tore Lund wrote:
> >> Would someone care to indicate when we would such "horribly inefficient"
> >> copying? I can only guess that this hints at a type of usage that
> >> differs considerably from what I am doing.
> >
> > If length = capacity by design, then every time you change the length of
> > a string you must allocate a new memory block to hold it. The string
> > "hello" would be stored as 5-h-e-l-l-o in your example. If I want to
> > append " world", I have to allocate a new string to hold the result:
> > 11-h-e-l-l-o-w-o-r-l-d. As string concatenation is a very common
> > operation, this approach seems horribly inefficient.
> >
> > If you track both the length and capacity, I can put "hello" in a
> > 20-byte buffer and have 20-5-h-e-l-l-o (or 20-h-e-l-l-o-\0). Then when
> > I want to append " world", there's enough room to do it without
> > allocating a new buffer and copying both strings:
> > 20-11-h-e-l-l-o-_-w-o-r-l-d (or 20-h-e-l-l-o-_-w-o-r-l-d-\0).
Guys, that's whey in early languages the buffer for a string was 255
bytes. In most languages you specify the size of every data type, or
it's already defined for you. It doesn't matter what language, it's
about the same in all of them if you really look close.
-- -- Leythos999@columbus.rr.com (Remove 999 to reply to me)
- Next message: NeoSadist: "Re: How to install Security updates?"
- Previous message: Alexander Lysenko: "analusis security in win2000"
- In reply to: Tore Lund: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Next in thread: Edward Elliott: "Re: Privilege-escalation attacks on NT-based Windows are unfixable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|