Re: Denial of denial of service

[prev] [thread] [next] [lurker] [Date index for 2007/02/01]

From: blah blah
Subject: Re: Denial of denial of service
Date: 00:52 on 01 Feb 2007
------=_Part_1920_29957789.1170291150137
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I'm not really hating length being part of the structure of the string. I'm
hating the fact that in BSTR's, the pointer points to the first character,
while the four bytes indicating length exist *before* the pointer, _as well
as_ the whole string being NULL-terminated.

http://msdn2.microsoft.com/en-us/library/ms221069.aspx

On 1/31/07, A. Pagaltzis <pagaltzis@xxx.xx> wrote:
>
> * blah blah <qwerty1602@xxxxx.xxx> [2007-01-31 09:40]:
> > Don't forget BSTR's, the best of them all. Typedef'd as a WCHAR
> > *, so you'd think they are the same, yet the four bytes before
> > the first character contains the length of the string. Greatest
> > idea ever.
> >
> > Hate.
>
> I am not disputing the hatefulness of false cognate typedefs.
> Pascal strings however *are* in fact a great idea for a tiringly
> long list for reasons -- better than C strings in every
> conceivable way bar one or two.
>
> (My trajectory as a programmer was BBC BASIC -> Pascal -> Forth
> -> x86 assembler -> C. When I first heard how strings worked in
> C, I thought "now that's stupid." I was but a greenhorn, but my
> intuition was clearly already decent; even a greenhorn can tell
> that C strings blow.)
>
> Regards,
> --
> Aristotle Pagaltzis // <http://plasmasturm.org/>;
>

------=_Part_1920_29957789.1170291150137
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I&#39;m not really hating length being part of the structure of the string. I&#39;m hating the fact that in BSTR&#39;s, the pointer points to the first character, while the four bytes indicating length exist *before* the pointer, _as well as_ the whole string being NULL-terminated. 
<br><br><a href="http://msdn2.microsoft.com/en-us/library/ms221069.aspx">http://msdn2.microsoft.com/en-us/library/ms221069.aspx</a><br><br><div><span class="gmail_quote">On 1/31/07, <b class="gmail_sendername">A. Pagaltzis
</b> &lt;<a href="mailto:pagaltzis@xxx.xx">pagaltzis@xxx.xx</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">* blah blah &lt;
<a href="mailto:qwerty1602@xxxxx.xxx">qwerty1602@xxxxx.xxx</a>&gt; [2007-01-31 09:40]:<br>&gt; Don&#39;t forget BSTR&#39;s, the best of them all. Typedef&#39;d as a WCHAR<br>&gt; *, so you&#39;d think they are the same, yet the four bytes before
<br>&gt; the first character contains the length of the string. Greatest<br>&gt; idea ever.<br>&gt;<br>&gt; Hate.<br><br>I am not disputing the hatefulness of false cognate typedefs.<br>Pascal strings however *are* in fact a great idea for a tiringly
<br>long list for reasons -- better than C strings in every<br>conceivable way bar one or two.<br><br>(My trajectory as a programmer was BBC BASIC -&gt; Pascal -&gt; Forth<br>-&gt; x86 assembler -&gt; C. When I first heard how strings worked in
<br>C, I thought &quot;now that&#39;s stupid.&quot; I was but a greenhorn, but my<br>intuition was clearly already decent; even a greenhorn can tell<br>that C strings blow.)<br><br>Regards,<br>--<br>Aristotle Pagaltzis // &lt;
<a href="http://plasmasturm.org/">http://plasmasturm.org/</a>&gt;<br></blockquote></div><br>;

------=_Part_1920_29957789.1170291150137--
There's stuff above here

Generated at 23:01 on 06 Feb 2007 by mariachi 0.52