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 825780 Details for
Bug 1031787
LMI_DirectoryContainsFileProvider.c crash if called with a non-directory
[?]
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]
Check return value of opendir() and return proper status
0002-Fail-gracefully-if-path-for-opendir-cannot-be-opened.patch (text/plain), 955 bytes, created by
Klaus Kämpf
on 2013-11-18 18:36:20 UTC
(
hide
)
Description:
Check return value of opendir() and return proper status
Filename:
MIME Type:
Creator:
Klaus Kämpf
Created:
2013-11-18 18:36:20 UTC
Size:
955 bytes
patch
obsolete
>From 602539a67c7ef50e7313ba8bfc312f809d6417c0 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de> >Date: Mon, 18 Nov 2013 11:28:38 -0700 >Subject: [PATCH 2/2] Fail gracefully if path for opendir() cannot be opened > >--- > src/logicalfile/LMI_DirectoryContainsFileProvider.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/src/logicalfile/LMI_DirectoryContainsFileProvider.c b/src/logicalfile/LMI_DirectoryContainsFileProvider.c >index be3c0a952b51..99f1a6f99586 100644 >--- a/src/logicalfile/LMI_DirectoryContainsFileProvider.c >+++ b/src/logicalfile/LMI_DirectoryContainsFileProvider.c >@@ -51,7 +51,10 @@ static CMPIStatus dir_file_objectpaths( > struct dirent *de; > DIR *dp; > dp = opendir(path); >- >+ if (dp == NULL) { >+ st.rc = CMPI_RC_ERR_NOT_FOUND; >+ return st; >+ } > while ((de = readdir(dp))) { > if (strcmp(de->d_name, ".") == 0) { > continue; >-- >1.8.4 >
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 1031787
: 825780