Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 8 Feb 2013 20:59:29 +0100
From: magnum <john.magnum@...hmail.com>
To: "john-dev@...ts.openwall.com" <john-dev@...ts.openwall.com>
Subject: C for dummies

This question stems from an OpenCL problem we just solved off list.

In common.c we have several lines like this:

char itoa16u[16] = "0123456789ABCDEF";

Is this a bug or not? That string literal is 17 bytes if you ask me. In the OpenCL format we were debugging, this caused major problems.

I am 100% autodidact, so I am not sure the above way of writing it is definitely wrong or not (my guess is it is wrong). Personally I would write it with empty braces (btw I'd also use const). OTOH if it's that bad, I'm puzzled no compiler or tool complained about it.

magnum

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ