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 315712 Details for
Bug 461074
libuser crashes on parsing invalid entries with missing semi-colons :
[?]
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]
patch based on upstream code
libuser-field-format.patch (text/plain), 1.34 KB, created by
ritz
on 2008-09-04 00:58:41 UTC
(
hide
)
Description:
patch based on upstream code
Filename:
MIME Type:
Creator:
ritz
Created:
2008-09-04 00:58:41 UTC
Size:
1.34 KB
patch
obsolete
>--- libuser-0.52.5.orig/modules/files.c 2004-10-11 02:26:45.000000000 +0530 >+++ libuser-0.52.5/modules/files.c 2008-09-02 22:43:00.000000000 +0530 >@@ -322,21 +322,19 @@ > size_t format_count, struct lu_ent *ent) > { > size_t i; >- int field, minimum = 1; >+ int field; > gchar **v = NULL; > GValue value; > > /* Make sure the line is properly formatted, meaning that it has enough > * fields in it for us to parse out all the fields we want, allowing for > * the last one to be empty. */ >- for (i = 0; i < format_count; i++) { >- minimum = MAX(minimum, formats[i].position); >- } >- v = g_strsplit(line, ":", format_count); >- if (lu_strv_len(v) < (size_t)(minimum - 1)) { >- g_warning("entry is incorrectly formatted"); >- return FALSE; >- } >+ v = g_strsplit(line, ":", format_count); >+ g_assert(format_count > 0); >+ if (lu_strv_len(v) < format_count - 1) { >+ g_warning("entry is incorrectly formatted"); >+ return FALSE; >+ } > > /* Now parse out the fields. */ > memset(&value, 0, sizeof(value)); >@@ -2605,8 +2603,7 @@ > } > /* If the account name matches the pattern, parse it and add > * it to the list. */ >- if (fnmatch(pattern, buf, 0) == 0) { >- parser(buf, ent); >+ if (fnmatch(pattern, buf, 0) == 0 && parser(buf, ent) != FALSE) { > g_ptr_array_add(ret, ent); > } else { > lu_ent_free(ent);
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 461074
:
315712
|
315807