Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:xwhu:Factory
dmraid
dmraid-1.0.0.rc13-jm_termination.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File dmraid-1.0.0.rc13-jm_termination.patch of Package dmraid
Index: 1.0.0.rc13/lib/format/ataraid/jm.c =================================================================== --- 1.0.0.rc13.orig/lib/format/ataraid/jm.c +++ 1.0.0.rc13/lib/format/ataraid/jm.c @@ -28,10 +28,15 @@ static char *name(struct lib_context *lc size_t len; struct jm *jm = META(rd, jm); char buf[2], *ret, *name = (char *) jm->name; + char buf0[JM_NAME_LEN+1] = { '\0' }; + size_t i = JM_NAME_LEN-1; - /* Name always 0 terminated ? */ - if ((len = strlen(name)) > JM_NAME_LEN) - len = JM_NAME_LEN; + strncpy(buf0, jm->name, JM_NAME_LEN); + while (i!=0 && buf0[i]==' ') { + buf0[i]='\0'; + --i; + } + len = strlen(buf0); len += sizeof(HANDLER) + 2; if (jm->mode == JM_T_RAID01)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor