os: avoid uninitialized offsets in backtrace
When xorg_backtrace calls unw_get_proc_name and an error occurs, offset might not be set for the current frame. Initialize offset for each frame so that the offset from another frame cannot be used inadvertently. Signed-off-by: Jeff Smith <whydoubt@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
6f9d29040c
commit
272fa18170
|
@ -78,6 +78,7 @@ xorg_backtrace(void)
|
|||
break;
|
||||
}
|
||||
|
||||
off = 0;
|
||||
ret = unw_get_proc_name(&cursor, procname, 256, &off);
|
||||
if (ret && ret != -UNW_ENOMEM) {
|
||||
if (ret != -UNW_EUNSPEC)
|
||||
|
|
Loading…
Reference in New Issue