diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/ChangeLog | 4 | ||||
-rw-r--r-- | common/simple-pwquery.c | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/common/ChangeLog b/common/ChangeLog index 28395053c..6f02303e6 100644 --- a/common/ChangeLog +++ b/common/ChangeLog @@ -1,3 +1,7 @@ +2004-02-19 Werner Koch <[email protected]> + + * simple-pwquery.c (agent_open): Don't mangle INFOSTR. + 2004-02-17 Werner Koch <[email protected]> * simple-pwquery.c (agent_open): Ignore an empty GPG_AGENT_INFO. diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c index 5ceddc613..50dabc218 100644 --- a/common/simple-pwquery.c +++ b/common/simple-pwquery.c @@ -273,6 +273,11 @@ agent_open (int *rfd) #endif return SPWQ_NO_AGENT; } + p = spwq_malloc (strlen (infostr)+1); + if (!p) + return SPWQ_OUT_OF_CORE; + strcpy (p, infostr); + infostr = p; if ( !(p = strchr ( infostr, ':')) || p == infostr || (p-infostr)+1 >= sizeof client_addr.sun_path ) @@ -344,7 +349,7 @@ agent_open (int *rfd) } -/* Copy text to BUFFER and escape as required. Return a poiinter to +/* Copy text to BUFFER and escape as required. Return a pointer to the end of the new buffer. NOte that BUFFER must be large enough to keep the entire text; allocataing it 3 times the size of TEXT is sufficient. */ |