Re: Does this string processing work for you?



Arjen Markus wrote:
The only thing I am not sure about is whether the count is guaranteed
to be available by the standard

It isn't. Heck, you could probably assume that based solely on who posted it, but citing the standard also works. :-)


See item (2) of 9.10.1 of f2003. Notably the "all do-variables... become undefined" bit. You basically can't count on anything in the I/O list when an error occurs on input. I can certainly imagine many implementations where n would end up with various other values here (size(v)+1 is an obvious one).

Yes, I have been bitten by assumptions exactly like this... except that it has been a long time because I stopped assuming this after I got bit once. See signature.

--
Richard Maine                     | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov            |        -- Mark Twain
.



Relevant Pages

  • Re: Curve25519-based EC-KCDSA
    ... signing just the hash of the message, using a standard hash function. ... those signature schemes aren't widely used. ... If the attacker aims at forgery, then an API accepting the hash doesn't ...
    (sci.crypt)
  • Re: Never mind ROVE the AG quit
    ... it would be clear that your intended sig is really a sig. ... The _standard_, as used by Christopher Jahn, is to mark the end of the ... message and the start of the signature with a line containing nothing ... Yes, and there's the signature delimiter, right where it's supposed ...
    (rec.arts.theatre.musicals)
  • Re: CryptoAPI and private key /not public/ encryption with CryptEncrypt - can not use CryptHash* fun
    ... >> It is possible with CAPI, but not possible with any of standard Microsoft ... > Encrypting with the private key is equivalent to signing. ... > than the hash that's used in the signature process, ...
    (microsoft.public.platformsdk.security)
  • Re: Is this Standard C++: int main(int argC, char* argV[])?
    ... > No, the standard says that the type of main is implementation defined, ... It then goes on to say that int main ... > the function signature). ... "There is only One inviolable Law" ...
    (comp.lang.cpp)
  • Re: YES!!!!!!!!!!!!!!Ascended...guy who needed help with amulet and air plane!!!!!
    ... >> in RFCs that defined Usenet from the beginning. ... >Take a look at RFC1036 ("Standard for Interchange of USENET Messages") ... >It's the best standard we have, so it's worth using, but the few RFCs ... >> signature convention as part of MIME, ...
    (rec.games.roguelike.nethack)