[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sun, 10 Mar 2024 09:35:46 -0400 (EDT) |
branch: master
commit 393129ef1b8fef39e235b5dfffb652416f390cfb
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Mar 10 13:46:51 2024 +0100
* tp/Texinfo/XS/convert/converter.c (copy_option): handle NULL source
string.
---
ChangeLog | 5 +++++
tp/Texinfo/XS/convert/converter.c | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 8ec07107c7..ec0a429436 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-03-10 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/converter.c (copy_option): handle NULL source
+ string.
+
2024-03-10 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/ParserNonXS.pm (_handle_line_command)
diff --git a/tp/Texinfo/XS/convert/converter.c
b/tp/Texinfo/XS/convert/converter.c
index 4c60306238..46a545f36e 100644
--- a/tp/Texinfo/XS/convert/converter.c
+++ b/tp/Texinfo/XS/convert/converter.c
@@ -135,7 +135,10 @@ copy_option (OPTION *destination, OPTION *source)
case GO_char:
case GO_bytes:
free (destination->string);
- destination->string = strdup (source->string);
+ if (!source->string)
+ destination->string = 0;
+ else
+ destination->string = strdup (source->string);
break;
default: