Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 498797 Details for
Bug 704568
Possible problems found by static analysis of code
Home
New
Search
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.rh90 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]
return_local
pnm2ppa-1.04-Coverity-return-local.patch (text/plain), 1.66 KB, created by
Jiri Popelka
on 2011-05-13 15:50:58 UTC
(
hide
)
Description:
return_local
Filename:
MIME Type:
Creator:
Jiri Popelka
Created:
2011-05-13 15:50:58 UTC
Size:
1.66 KB
patch
obsolete
>diff -up pnm2ppa-1.04/calibrate_ppa.c.return_local pnm2ppa-1.04/calibrate_ppa.c >--- pnm2ppa-1.04/calibrate_ppa.c.return_local 2000-11-11 23:22:38.000000000 +0100 >+++ pnm2ppa-1.04/calibrate_ppa.c 2011-05-13 16:12:26.000000000 +0200 >@@ -75,7 +75,7 @@ main (int argc, char *argv[]) > BOOLEAN gamma = false ; > FILE *outFile = NULL ; > int testPattern = 0; >- char *out_filepath = NULL; >+ char out_filepath[MAXPATHLEN]; > char c; > static struct option long_opts[] = { > {"gamma",0,0,'g'}, >@@ -157,9 +157,7 @@ main (int argc, char *argv[]) > { > if ( strlen(optarg) < MAXPATHLEN ) > { >- char filepath[MAXPATHLEN]; >- strncpy(filepath, optarg, MAXPATHLEN); >- out_filepath = filepath ; >+ strncpy(out_filepath, optarg, MAXPATHLEN); > use_stdout = false ; > } > } >diff -up pnm2ppa-1.04/pnm2ppa.c.return_local pnm2ppa-1.04/pnm2ppa.c >--- pnm2ppa-1.04/pnm2ppa.c.return_local 2000-11-11 20:53:03.000000000 +0100 >+++ pnm2ppa-1.04/pnm2ppa.c 2011-05-13 16:34:09.000000000 +0200 >@@ -145,20 +145,15 @@ print_pnm (FILE * fptr) > char * > readPath(char *input ) > { >- char File_path[MAXPATHLEN]; > char *path = NULL; > /* security audit ajv 20001007; be very careful with input strings!*/ > if (strlen(input) < MAXPATHLEN ) > { >- if ( strncpy (File_path, input, MAXPATHLEN )) >- { >- /* >- a user-specifed file *File_path may later be opened; >- should any extra validation of this be performed now ? >- */ >- path = File_path; >- return path; >- } >+ path = strdup(input); >+ /* >+ a user-specifed file *path may later be opened; >+ should any extra validation of this be performed now ? >+ */ > } > else > {
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 704568
: 498797