Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 158192 Details for
Bug 246219
gpm uses variable argument lists incorrectly
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix to incorrect use of variable argument lists in gpm's gpm_report()
gpm-1.20.1-stdarg.patch (text/plain), 3.89 KB, created by
Lubomir Kundrak
on 2007-06-29 10:45:42 UTC
(
hide
)
Description:
Fix to incorrect use of variable argument lists in gpm's gpm_report()
Filename:
MIME Type:
Creator:
Lubomir Kundrak
Created:
2007-06-29 10:45:42 UTC
Size:
3.89 KB
patch
obsolete
>Variable arguments structure has an undefined value after call to vsyslog(3). >Though it is not clear from the manual, printf(3) manual states a similar >fact for v*printf() clearly. > >--- gpm-1.20.1/src/report.c.orig 2007-06-29 11:40:50.000000000 +0200 >+++ gpm-1.20.1/src/report.c 2007-06-29 12:30:15.000000000 +0200 >@@ -74,6 +74,11 @@ void gpm_report(int line, char *file, in > FILE *f = NULL; > va_list ap; > >+#ifdef HAVE_VSYSLOG >+ va_list ap_vsyslog; >+ va_start(ap_vsyslog, text); >+#endif >+ > va_start(ap,text); > > switch(option.run_status) { >@@ -83,7 +88,7 @@ void gpm_report(int line, char *file, in > case GPM_STAT_INFO: > #ifdef HAVE_VSYSLOG > syslog(LOG_INFO | LOG_USER, GPM_STRING_INFO); >- vsyslog(LOG_INFO | LOG_USER, text, ap); >+ vsyslog(LOG_INFO | LOG_USER, text, ap_vsyslog); > #endif > fprintf(stderr,GPM_STRING_INFO); > vfprintf(stderr,text,ap); >@@ -93,7 +98,7 @@ void gpm_report(int line, char *file, in > case GPM_STAT_WARN: > #ifdef HAVE_VSYSLOG > syslog(LOG_DAEMON | LOG_WARNING, GPM_STRING_WARN); >- vsyslog(LOG_DAEMON | LOG_WARNING, text, ap); >+ vsyslog(LOG_DAEMON | LOG_WARNING, text, ap_vsyslog); > #endif > fprintf(stderr,GPM_STRING_WARN); > vfprintf(stderr,text,ap); >@@ -103,7 +108,7 @@ void gpm_report(int line, char *file, in > case GPM_STAT_ERR: > #ifdef HAVE_VSYSLOG > syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_ERR); >- vsyslog(LOG_DAEMON | LOG_ERR, text, ap); >+ vsyslog(LOG_DAEMON | LOG_ERR, text, ap_vsyslog); > #endif > fprintf(stderr,GPM_STRING_ERR); > vfprintf(stderr,text,ap); >@@ -113,7 +118,7 @@ void gpm_report(int line, char *file, in > case GPM_STAT_OOPS: > #ifdef HAVE_VSYSLOG > syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_OOPS); >- vsyslog(LOG_DAEMON | LOG_ERR, text, ap); >+ vsyslog(LOG_DAEMON | LOG_ERR, text, ap_vsyslog); > #endif > fprintf(stderr,GPM_STRING_OOPS); > vfprintf(stderr,text,ap); >@@ -130,14 +135,14 @@ void gpm_report(int line, char *file, in > case GPM_STAT_INFO: > #ifdef HAVE_VSYSLOG > syslog(LOG_INFO | LOG_USER, GPM_STRING_INFO); >- vsyslog(LOG_INFO | LOG_USER, text, ap); >+ vsyslog(LOG_INFO | LOG_USER, text, ap_vsyslog); > #endif > break; > > case GPM_STAT_WARN: > #ifdef HAVE_VSYSLOG > syslog(LOG_DAEMON | LOG_WARNING, GPM_STRING_WARN); >- vsyslog(LOG_DAEMON | LOG_WARNING, text, ap); >+ vsyslog(LOG_DAEMON | LOG_WARNING, text, ap_vsyslog); > #endif > if ((f = fopen(GPM_SYS_CONSOLE, "a")) != NULL) { > fprintf(f, GPM_STRING_WARN); >@@ -150,7 +155,7 @@ void gpm_report(int line, char *file, in > case GPM_STAT_ERR: > #ifdef HAVE_VSYSLOG > syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_ERR); >- vsyslog(LOG_DAEMON | LOG_ERR, text, ap); >+ vsyslog(LOG_DAEMON | LOG_ERR, text, ap_vsyslog); > #endif > if ((f = fopen(GPM_SYS_CONSOLE, "a")) != NULL) { > fprintf(f, GPM_STRING_ERR); >@@ -170,7 +175,7 @@ void gpm_report(int line, char *file, in > case GPM_STAT_OOPS: > #ifdef HAVE_VSYSLOG > syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_OOPS); >- vsyslog(LOG_DAEMON | LOG_ERR, text, ap); >+ vsyslog(LOG_DAEMON | LOG_ERR, text, ap_vsyslog); > #endif > fprintf(stderr,GPM_STRING_OOPS); > vfprintf(stderr,text,ap); >@@ -208,6 +213,9 @@ void gpm_report(int line, char *file, in > > break; > } /* switch for current modus */ >+ >+ va_end(ap); >+ va_end(ap_vsyslog); > } /* gpm_report */ > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 246219
: 158192