[PATCH] Implement more export-options (clean, no-export-attributes)

Daniele Ricci daniele.athome at gmail.com
Fri Jan 17 10:41:47 CET 2014


I fixed the dangling pointer issue.
This time I have to attach the patch because I'm behind corporate
proxy (I only have web access and Gmail is known to break long lines).
Sorry for that.

On Fri, Jan 17, 2014 at 10:34 AM, Daniele Ricci
<daniele.athome at gmail.com> wrote:
> You're right, sorry. Fixing now.
>
> On Fri, Jan 17, 2014 at 8:58 AM, Werner Koch <wk at gnupg.org> wrote:
>> On Fri, 17 Jan 2014 00:10, daniele.athome at gmail.com said:
>>> +  a = realloc (a, sizeof *a + strlen (a->arg) + strlen (arg));
>>> +  if (!a)
>>> +    return gpg_error_from_syserror ();
>>> +
>>> +  strcat (a->arg, arg);
>>> +
>>> +  *gpg->argtail = a;
>>> +  gpg->argtail = &a->next;
>>
>> This assumes that realloc does not change the value of A.  realloc may
>> return a pointer to a different memory block.  In turn the predecessor
>> of the original A will have a dangling pointer.
>>
>>
>>
>> Shalom-Salam,
>>
>>    Werner
>>
>> --
>> Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
>>
>
>
>
> --
> Daniele



-- 
Daniele
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Implement-more-export-options-clean-no-export-attrib.patch
Type: text/x-patch
Size: 6906 bytes
Desc: not available
URL: </pipermail/attachments/20140117/4ab161d9/attachment.bin>


More information about the Gnupg-devel mailing list