aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2011-01-10 10:37:57 +0000
committerWerner Koch <[email protected]>2011-01-10 10:37:57 +0000
commit2732f2ff3f44a5aae969d5ce16a4de74478576a2 (patch)
tree38b543eeaab06c36c2c4b3263bbd63c6655403d4
parentSupport the gnuk token pinpad code. (diff)
downloadgnupg-2732f2ff3f44a5aae969d5ce16a4de74478576a2.tar.gz
gnupg-2732f2ff3f44a5aae969d5ce16a4de74478576a2.zip
Fix bug #1311.
-rw-r--r--NEWS3
-rw-r--r--common/ChangeLog5
-rw-r--r--common/session-env.c5
3 files changed, 11 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 2cdf854bf..215373345 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,9 @@ Noteworthy changes in version 2.1.0beta2 (unreleased)
* Fixed CRL loading under W32 (bug#1010).
+ * Fixed TTY management for pinentries and session variable update
+ problem.
+
Noteworthy changes in version 2.1.0beta1 (2010-10-26)
-----------------------------------------------------
diff --git a/common/ChangeLog b/common/ChangeLog
index de96b8dc8..6a6f6e071 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-10 Werner Koch <[email protected]>
+
+ * session-env.c (update_var): Fix same value detection. Fixes
+ bug#1311.
+
2010-12-17 Werner Koch <[email protected]>
* asshelp.c (lock_spawning): Add arg VERBOSE. Improve timeout
diff --git a/common/session-env.c b/common/session-env.c
index 2dcf425b6..d719a7b87 100644
--- a/common/session-env.c
+++ b/common/session-env.c
@@ -183,10 +183,11 @@ update_var (session_env_t se, const char *string, size_t namelen,
else if (!strncmp (se->array[idx]->name, string, namelen)
&& strlen (se->array[idx]->name) == namelen)
{
- /* Check if the value is the same; no need to update it,
- except for updating the default flag. */
if (strlen (se->array[idx]->value) == valuelen)
{
+ /* The new value has the same length. We can update it
+ in-place. */
+ memcpy (se->array[idx]->value, value, valuelen);
se->array[idx]->is_default = !!set_default;
return 0;
}