From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Jack Miller <jack-jZyo8ZIaZD9AfugRpC6u6w@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] Properly handle \0 delimited string lists
Date: Wed, 11 Jun 2014 23:10:39 +1000 [thread overview]
Message-ID: <20140611131039.GA29130@voom> (raw)
In-Reply-To: <1402430256-8359-1-git-send-email-jack-jZyo8ZIaZD9AfugRpC6u6w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 960 bytes --]
Hi Jack,
Long time no see :).
On Tue, Jun 10, 2014 at 02:57:36PM -0500, Jack Miller wrote:
> reserved-names="res1\0res2\0res3";
>
> Is valid DTS. This one-liner expands data based on the len given by the lexer
> instead of strlen.
>
> Without this patch, realloc gets confused and hangs. For example:
>
> *** Error in `./dtc': realloc(): invalid next size: 0x0000000001961670
> ***
So.. the patch certainly isn't wrong, and is arguably safer than the
current version.
But.. I haven't been able to reproduce the problem, and I don't really
see how it would occur in the first place.
The thing we're taking a strlen of is the input with it's escapes, so
it won't have NULs, just backslashes and 0 digits.
Or am I missing something?
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-06-11 13:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 19:57 [PATCH] Properly handle \0 delimited string lists Jack Miller
[not found] ` <1402430256-8359-1-git-send-email-jack-jZyo8ZIaZD9AfugRpC6u6w@public.gmane.org>
2014-06-11 13:10 ` David Gibson [this message]
2014-06-12 22:47 ` Jack Miller
[not found] ` <20140612224728.GA17938-O8SCTCEbm15XsEFxtoW7CMxtgHpCUUYS@public.gmane.org>
2014-06-13 10:16 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140611131039.GA29130@voom \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jack-jZyo8ZIaZD9AfugRpC6u6w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).