[systemd-devel] [systemd-commits] 2 commits - src/libsystemd

Lennart Poettering lennart at poettering.net
Sun Apr 5 02:50:52 PDT 2015


On Fri, 03.04.15 13:23, Tom Gundersen (tomegun at kemper.freedesktop.org) wrote:

>  
> -                tags = strdupa(value);
> +                FOREACH_WORD_SEPARATOR(word, l, value, ":", state) {
> +                        char *tag;
>  
> -                while ((next = strchr(tags, ':'))) {
> -                        next[0] = '\0';
> +                        tag = strndupa(word, l);
>  

Repeat after me: I shall not use alloca() within loops. I shall not
use alloca() within loops. I shall not use alloca() within loops.

This cannot work.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list