Projects
home:pandora:RobinOS23
gpm
_service:download_src_package:0015-report-avoid...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_src_package:0015-report-avoid-Wformat-security-warnings.patch of Package gpm
From 7ba518ff8b5e5c06d0a74b1fecf3b682f14c631c Mon Sep 17 00:00:00 2001 From: Mike Frysinger <vapier@gentoo.org> Date: Sun, 14 Feb 2016 18:07:46 -0500 Subject: [PATCH 15/28] report: avoid -Wformat-security warnings Some functions warn when you pass a string to a printf style function that is a dynamic buffer as its contents cannot be verified. Since we don't want to support that here, just use %s. --- src/lib/report-lib.c | 2 +- src/prog/mouse-test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/report-lib.c b/src/lib/report-lib.c index b565b77..03230b4 100644 --- a/src/lib/report-lib.c +++ b/src/lib/report-lib.c @@ -47,7 +47,7 @@ void gpm_report(int line, const char *file, int stat, const char *text, ... ) log_level = LOG_CRIT; break; } #ifdef HAVE_VSYSLOG - syslog(log_level, string); + syslog(log_level, "%s", string); vsyslog(log_level, text, ap); #else fprintf(stderr,"%s[%s(%d)]:\n",string,file,line); diff --git a/src/prog/mouse-test.c b/src/prog/mouse-test.c index ab8d602..d7d1027 100644 --- a/src/prog/mouse-test.c +++ b/src/prog/mouse-test.c @@ -189,7 +189,7 @@ int mousereopen(int oldfd, const char *name, Gpm_Type *type) close(oldfd); usleep(100000); fd=open(name,O_RDWR); - if (fd < 0) gpm_report(GPM_PR_OOPS,name); + if (fd < 0) gpm_report(GPM_PR_OOPS, "%s", name); (*I_serial)(fd,type->flags,type,1,&type->name); /* ms initialization */ return fd; } -- 2.19.1.6.gb485710b
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
.
浙ICP备2022010568号-2