Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 204364 Details for
Bug 285241
Version bump for sys-fs/dmraid-1.0.0_rc16
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Proposed patch to fix jmicron segfault issues
dmraid-1.0.0_rc16-jmicron-fixes.patch (text/plain), 1.01 KB, created by
Ian Stakenvicius (RETIRED)
on 2009-09-16 20:11:38 UTC
(
hide
)
Description:
Proposed patch to fix jmicron segfault issues
Filename:
MIME Type:
Creator:
Ian Stakenvicius (RETIRED)
Created:
2009-09-16 20:11:38 UTC
Size:
1.01 KB
patch
obsolete
>Fix segfault when attempting to generate name for jmicron controllers. >LP #344215 >--- a/1.0.0.rc15/lib/format/ataraid/jm.c >+++ b/1.0.0.rc15/lib/format/ataraid/jm.c >@@ -25,18 +25,19 @@ static int member(struct jm *jm); > static char * > name(struct lib_context *lc, struct raid_dev *rd, unsigned int subset) > { >- int i; >+ size_t i = JM_NAME_LEN-1; > size_t len; > struct jm *jm = META(rd, jm); >- char buf[JM_NAME_LEN + 1], *ret, *name = (char *) jm->name; >+ char *ret, *name = (char *) jm->name; >+ char buf[JM_NAME_LEN+1] = { '\0' }; > >- /* Name always 0 terminated or whitespace at end ? */ >- strncpy(buf, name, JM_NAME_LEN); >- len = strlen(buf); >- i = len < JM_NAME_LEN ? len : JM_NAME_LEN; >- buf[i] = 0; >- while (i-- && isspace(buf[i])) >- buf[i] = 0; >+ /* Sanitize name, make sure it's null terminated */ >+ strncpy(buf, jm->name, JM_NAME_LEN); >+ while (i && isspace(buf[i])) { >+ name[i]='\0'; >+ buf[i]='\0'; >+ --i; >+ } > > len = strlen(buf) + sizeof(HANDLER) + (jm->mode == JM_T_RAID01 ? 3 : 2); > if ((ret = dbg_malloc(len))) {
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 Raw
Actions:
View
Attachments on
bug 285241
:
204360
|
204361
|
204362
| 204364