Project

General

Profile

Bug #10319

Uninitialized var used in /bin/ld

Added by Jean-Pierre André 10 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2019-01-29
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

Description

In update_osym() from src/cmd/sgs/libld/common/update.c (part of /bin/ld), the variable edata_abs may be used without being initialized.

Suggested patch :

--- update.c.ref    2019-01-29 08:37:52.633626200 +0100
+++ update.c    2019-01-29 08:38:39.448024900 +0100
@@ -176,7 +176,7 @@
     Is_desc        *isc;
     Ifl_desc    *ifl;
     Word        bssndx, etext_ndx, edata_ndx = 0, end_ndx, start_ndx;
-    Word        end_abs = 0, etext_abs = 0, edata_abs;
+    Word        end_abs = 0, etext_abs = 0, edata_abs = 0;
     Word        tlsbssndx = 0, parexpnndx;
 #if    defined(_ELF64)
     Word        lbssndx = 0;

Also available in: Atom PDF