aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-07-30 08:25:22 +0000
committerWerner Koch <[email protected]>2025-07-30 08:25:22 +0000
commit78c4d5d20c422e2cb92c8f6d5c90a297596fa94f (patch)
tree9e8d3afcbe63ff1f90974637ef11d8e17c93b943
parentagent: Another fix for our use of point prefixes. (diff)
downloadgnupg-78c4d5d20c422e2cb92c8f6d5c90a297596fa94f.tar.gz
gnupg-78c4d5d20c422e2cb92c8f6d5c90a297596fa94f.zip
gpg: Fix segv in key signing introduced in 2.5.10
* g10/sign.c (mk_notation_policy_etc): Do not free ndmanu if not used. -- GnuPG-bug-id: 7754 Fixes-commit: 11d3a83b04786c74fdbbbcdc99074c75666bd722
-rw-r--r--g10/sign.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/g10/sign.c b/g10/sign.c
index b3bda581c..2ba30f09c 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -125,10 +125,13 @@ mk_notation_policy_etc (ctrl_t ctrl, PKT_signature *sig,
xfree (item->altvalue);
item->altvalue = NULL;
}
- /* Restore the original nd and release ndmanu. */
- nd = ndmanu;
- ndmanu->next = NULL;
- free_notation (ndmanu);
+ if (with_manu)
+ {
+ /* Restore the original nd and release ndmanu. */
+ nd = ndmanu;
+ ndmanu->next = NULL;
+ free_notation (ndmanu);
+ }
}
/* Set policy URL. */