For starters your signature is bad, at least here.

On Thu, 27 Feb 2003 23:18:35 -0500, Patrick Chkoreff <[EMAIL PROTECTED]> wrote:
>I have devised what I believe to be a foolproof and completely
>portable way of setting an array of bytes to all zeroes, a common
>security operation in cryptography programs.

I have a really hard time trusting your code. Read on.

>Here is a simple example of how we can generate this "undecidable
>zero" and pass it into the routine.
>
>int
>main(int argc, char *argv[])
>{
>     char array[32];
>     char magic = (argc < 1 ? 0 : 255);
>
>     clear_bytes(magic, array, sizeof(array));
>
>     return 0;
>}
>
>
>If you call this program with no command line arguments, the value of
>magic will be 0 and the clear_bytes is guaranteed to zero out the
>array.

Wrong. Even with no arguments to this sample program, argc will still
be 1. Try it if you don't believe me. Or re-read your K&R.

Reply via email to