[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #66079] [troff] uninitialized local `s` potentially used in `token:
From: |
G. Branden Robinson |
Subject: |
[bug #66079] [troff] uninitialized local `s` potentially used in `token::add_to_zero_width_node_list()` |
Date: |
Wed, 21 Aug 2024 08:20:24 -0400 (EDT) |
Follow-up Comment #5, bug #66079 (group groff):
[comment #4 comment #4:]
> Sorry, I attached the wrong .second patch. Now attaching the right one.
>
> (file #56372)
Thanks. I see. That's a separate issue; these are two unrelated local
variables called `s`.
From c19274b6ec048aa8c9d5e78bec22609aadf0ff4c Mon Sep 17 00:00:00 2001
From: Lukas Javorsky <ljavorsk@redhat.com>
Date: Mon, 12 Aug 2024 15:45:45 +0200
Subject: [PATCH 5/7] Initialize "s" to prevent undefined behavior
---
src/roff/troff/env.cpp | 2 +-
src/roff/troff/input.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 6bc65105b..13c146e12 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -295,7 +295,7 @@ void leader_character()
void environment::add_char(charinfo *ci)
{
- int s;
+ int s = 0;
node *gc_np = 0 /* nullptr */;
if (line_interrupted)
;
I'll study this patch (specifically, the data flow of `s` contents), and if I
commit will try harder to remember to identify you as the commit author. (I
failed to do so in bug #66081.)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66079>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
- [bug #66079] [troff] Uninitialized variable used within add_char function in roff/troff/input.cpp, Lukas Javorsky, 2024/08/12
- [bug #66079] [troff] Uninitialized variable used within add_char function in roff/troff/input.cpp, Lukas Javorsky, 2024/08/13
- [bug #66079] [troff] Uninitialized variable used within add_char function in roff/troff/input.cpp, Lukas Javorsky, 2024/08/13
- [bug #66079] [troff] uninitialized local `s` used in `token::add_to_zero_width_node_list()`, G. Branden Robinson, 2024/08/14
- [bug #66079] [troff] uninitialized local `s` used in `token::add_to_zero_width_node_list()`, G. Branden Robinson, 2024/08/14
- [bug #66079] [troff] uninitialized local `s` used in `token::add_to_zero_width_node_list()`, G. Branden Robinson, 2024/08/14
- [bug #66079] [troff] uninitialized local `s` potentially used in `token::add_to_zero_width_node_list()`, G. Branden Robinson, 2024/08/14
- [bug #66079] [troff] uninitialized local `s` potentially used in `token::add_to_zero_width_node_list()`, G. Branden Robinson, 2024/08/15
- [bug #66079] [troff] uninitialized local `s` potentially used in `token::add_to_zero_width_node_list()`, Lukas Javorsky, 2024/08/21
- [bug #66079] [troff] uninitialized local `s` potentially used in `token::add_to_zero_width_node_list()`,
G. Branden Robinson <=
- [bug #66079] [troff] uninitialized local `s` potentially used in `token::add_to_zero_width_node_list()`, G. Branden Robinson, 2024/08/21
- [bug #66079] [troff] uninitialized local `s` potentially used in `token::add_to_zero_width_node_list()`, G. Branden Robinson, 2024/08/21