Projects
scan
scanbd
0002-Extend-PATH-variable-length-for-script-to-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-Extend-PATH-variable-length-for-script-to-four-times.patch of Package scanbd
From 11ed610e80b9e0cfeaccf6592616de1b1b6c1df9 Mon Sep 17 00:00:00 2001 From: Frank Kunz <mailinglists@kunz-im-inter.net> Date: Tue, 24 May 2022 21:46:37 +0200 Subject: [PATCH 2/2] Extend PATH variable length for script to four times MANE_MAX Signed-off-by: Frank Kunz <mailinglists@kunz-im-inter.net> --- src/scanbd/sane.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scanbd/sane.c b/src/scanbd/sane.c index 14b2dcc..dfd184b 100644 --- a/src/scanbd/sane.c +++ b/src/scanbd/sane.c @@ -941,7 +941,9 @@ static void* sane_poll(void* arg) { } const char* ev = "PATH"; if (getenv(ev) != NULL) { - snprintf(env[e], NAME_MAX, "%s=%s", ev, getenv(ev)); + env[e] = realloc(env[e], NAME_MAX * 4 + 1); + memset(env[e], 0, NAME_MAX * 4 + 1); + snprintf(env[e], NAME_MAX * 4, "%s=%s", ev, getenv(ev)); slog(SLOG_DEBUG, "setting env: %s", env[e]); e += 1; } -- 2.36.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.