Hi,

2013/2/3  <[email protected]>:
> Author: mmetz
> Date: 2013-02-03 08:06:21 -0800 (Sun, 03 Feb 2013)
> New Revision: 54874
>
> Modified:
>    grass/trunk/vector/v.in.ogr/main.c
> Log:
> v.in.ogr: fix r54872 for linux

[...]

>         len = strlen("SHAPE_ENCODING") + strlen(param.encoding->answer) + 2;
> -       buf = G_malloc(len * sizeof(char));
> +       encbuf = G_malloc(len * sizeof(char));
>          /* -> Esri Shapefile */
> -       sprintf(buf, "SHAPE_ENCODING=%s", param.encoding->answer);
> -       putenv(buf);
> +       sprintf(encbuf, "SHAPE_ENCODING=%s", param.encoding->answer);
> +       encp = G_store(encbuf);
> +       putenv(encp);

any reason why not use G_asprintf() ? Martin

-- 
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to