From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/119 Path: news.gmane.org!not-for-mail From: Solar Designer Newsgroups: gmane.linux.lib.musl.general Subject: Re: Daily reports: Friday - cont Date: Sat, 9 Jul 2011 05:38:05 +0400 Message-ID: <20110709013805.GA4656@openwall.com> References: <4E125DBC.9090809@gmail.com> <4E131E8F.9@gmail.com> <4E14C55E.6030808@gmail.com> <4E16141F.5060303@gmail.com> <4E17877E.30907@gmail.com> <4E17AAE0.60704@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1310175494 22516 80.91.229.12 (9 Jul 2011 01:38:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 9 Jul 2011 01:38:14 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-203-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jul 09 03:38:10 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1QfMUj-0003lH-OO for gllmg-musl@lo.gmane.org; Sat, 09 Jul 2011 03:38:09 +0200 Original-Received: (qmail 24526 invoked by uid 550); 9 Jul 2011 01:38:09 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 24514 invoked from network); 9 Jul 2011 01:38:09 -0000 Content-Disposition: inline In-Reply-To: <4E17AAE0.60704@gmail.com> User-Agent: Mutt/1.4.2.3i Xref: news.gmane.org gmane.linux.lib.musl.general:119 Archived-At: 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" > as NULL, and three 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. Alexander