Project

General

Profile

Actions

Bug #15488

open

libbsm: storing the address of local variable

Added by Toomas Soome 3 months ago. Updated 3 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Build error with gcc 12:

    ../common/audit_crontab.c: In function 'audit_crontab_get_diffs':
    ../common/audit_crontab.c:218:25: error: storing the address of local variable 'err_buf' in '*bufptr' [-Werror=dangling-pointer=]
      218 |                 *bufptr = err_buf;
          |                 ~~~~~~~~^~~~~~~~~
    ../common/audit_crontab.c:172:30: note: 'err_buf' declared here
      172 |         char    *buf = NULL, err_buf[128];
          |                              ^~~~~~~
    ../common/audit_crontab.c:172:30: note: 'bufptr' declared here

The first idea is to change this buffer to static.

Actions #1

Updated by Electric Monk 3 months ago

  • Gerrit CR set to 2719
Actions

Also available in: Atom PDF