Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 9 Jul 2011 05:38:05 +0400
From: Solar Designer <>
Subject: Re: Daily reports: Friday - cont

Hi Luka,

I just want to let you know that I appreciate your frequent reports.

I intend to take a look at your latest code during the weekend.

On Sat, Jul 09, 2011 at 03:12:00AM +0200, Luka Mar??eti?? wrote:
> I apologize for the delay, I thought I had a bug in my code (the new 
> String.c to be precise), but it turns out gdb was playing tricks on me. 
> I've learned that it doesn't (necessarily) regard "\0<char><char><char>" 
> as NULL, and three <char>s, but sometimes as some other char (like '.' 
> and '='). You probably know why (octal char representation), I didn't.

This applies to C sources as well, and to some other languages.  My
approach to dealing with it is generally to split/concatenate the string
right after the escape sequence, like this:

const char *k = "\xff\xa3" "34" "\xff\xff\xff\xa3" "345";

(from some code I wrote yesterday).

I think this one was actually OK without the splits, but better safe
than sorry - and like you say with octals the problem is more real.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.