b_finalize.
- If symstrdata is NULL, the program exits with an error.
Triggers found by static analyzer Svace.
Signed-off-by: Anton Moryakov
---
src/unstrip.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/unstrip.c b/src/unstrip.c
index d70053de..35c04700 100644
--- a/src/unstrip.c
yzer Svace.
Signed-off-by: Anton Moryakov
---
src/readelf.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/src/readelf.c b/src/readelf.c
index 6526db07..3bdfb391 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -12440,6 +12440,11 @@ handle_core_item (Elf *core, const Ebl_Core_Item
*item,
elf_strptr call.
- The check is placed before the first use of scnname to prevent dereferencing
a NULL pointer.
Triggers found by static analyzer Svace.
Signed-off-by: Anton Moryakov
---
src/readelf.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/src/readelf.c b/src/readelf.c
inde
L, release resources with `elf_end` and skip
the current iteration using `continue`.
Triggers found by static analyzer Svace.
Signed-off-by: Anton Moryakov
---
src/readelf.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/readelf.c b/src/readelf.c
index 6526db07..4c14f
usually checked
for this function (4/5)
Corrections explained:
Added check if (arhdr == NULL) goto next;
Triggers found by static analyzer Svace.
Signed-off-by: Anton Moryakov
---
src/ar.c | 12
1 file changed, 12 insertions(+)
diff --git a/src/ar.c b/src/ar.c
index 9ace28b9..4b901
r' returns NULL. This patch adds a check to
ensure 'arhdr' is not NULL before using it. The fix ensures that the
function safely handles cases where 'elf_getarhdr' fails, avoiding
potential crashes.
Triggers found by static analyzer Svace.
Signed-off-by: Anton Moryakov
--
r' returns NULL. This patch adds
a check to ensure 'arhdr' is not NULL before using it.
The fix ensures that the function safely handles cases where
'elf_getarhdr' fails, avoiding potential crashes.
Triggers found by static analyzer Svace.
Signed-off-by: Anton Moryakov
ers found by static analyzer Svace.
Signed-off-by: Anton Moryakov
---
libdwfl/dwfl_segment_report_module.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libdwfl/dwfl_segment_report_module.c
b/libdwfl/dwfl_segment_report_module.c
index 32f44af8..565884f0 100644
--- a/
leading to undefined
behavior. This patch adds a check to ensure 'd' is not NULL
before using it.
The fix ensures that the function safely handles cases where
section data is missing, avoiding potential crashes.
Triggers found by static analyzer Svace.
Signed-off-by: Anton Moryakov
---
pointer, leading to undefined behavior. This patch adds a check
to ensure suffix is not NULL before using it in stpcpy.
The fix ensures that new_suffix is properly initialized even when
suffix is NULL, avoiding potential crashes.
Triggers found by static analyzer Svace.
Signed-off-by: Anton Moryakov
eck.
This fix adds a NULL check before using arhdr, preventing a potential null
dereference.
This check ensures that the code safely handles cases when elf_getarhdr returns
NULL,
avoiding unexpected crashes.
Found by RASU JSC.
Signed-off-by: Anton Moryakov
---
elfutils/src/ar.c | 6
ill assert that the buffer is large enough to hold all
possible values, without changing the rest of the logic.
Found by RASY JSC
signed-off-by: Anton Moryakov
diff --git a/elfutils/backends/sparc_attrs.c b/elfutils/backends/sparc_attrs.c
index 974e8fb..8cbf8cb 100644
--- a/elfutils/backends/spa
fer-overflow-in-sparc_check.patch
@@ -14,13 +14,13 @@ Found by RASU JSC.
Signed-off-by: Anton Moryakov
---
- elfutils/backends/sparc_attrs.c | 11 ---
+backends/sparc_attrs.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
-diff --git a/elfutils/backends/sparc_attrs
beyond the allocated memory.
Remaining space update: remaining_size is updated after each entry to ensure
that row additions do not cause overflow.
Found by RASU JSC.
Signed-off-by: Anton Moryakov
---
elfutils/backends/sparc_attrs.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
function 'dlopen' and lost at debuginfod-client.c:129.
In __libdwfl_debuginfod_init, added dlclose(debuginfod_so) after symbol loading,
ensuring that the handle is released whether symbols are successfully loaded or
not.
This prevents potential handle leak reported by static analysis.
Previously, the handle debuginfod_so created by dlopen was not closed
in all cases, leading to a potential resource leak. This commit adds an
additional dlclose call to ensure that the handle is always properly
released, whether the symbols are successfully loaded or not.
Found by RASU JSC.
Si
16 matches
Mail list logo