projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c43ff24
)
Revert "udev: prepare memory for extra NUL termination for NULSTR"
author
Dmitry V. Levin
<ldv@strace.io>
Sun, 19 Mar 2023 08:00:00 +0000
(08:00 +0000)
committer
Dmitry V. Levin
<ldv@strace.io>
Sun, 19 Mar 2023 11:32:09 +0000
(11:32 +0000)
This reverts commit
cd3c8a117ccf3505e49d34324473e2175ef0a9ce
which was
papering over the bug instead of a proper fix made by the previous
commit.
src/udev/udev-rules.c
patch
|
blob
|
history
diff --git
a/src/udev/udev-rules.c
b/src/udev/udev-rules.c
index 71c09492202014a501c487c011997679607e2e9d..a1c17a24e8c639e4cf3c6e98314a85480ae974fe 100644
(file)
--- a/
src/udev/udev-rules.c
+++ b/
src/udev/udev-rules.c
@@
-1148,9
+1148,7
@@
static int rule_add_line(UdevRuleFile *rule_file, const char *line_str, unsigned
if (isempty(line_str))
return 0;
- /* We use memdup_suffix0() here, since we want to add a second NUL byte to the end, since possibly
- * some parsers might turn this into a "nulstr", which requires an extra NUL at the end. */
- line = memdup_suffix0(line_str, strlen(line_str) + 1);
+ line = strdup(line_str);
if (!line)
return log_oom();