Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
sblim-gather.18126
sblim-gather-zECKD-attributes-array.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sblim-gather-zECKD-attributes-array.patch of Package sblim-gather.18126
From: Petr Tesarik <ptesarik@suse.com> Date: 2017-03-24 14:25:43 +0100 Subject: Use an array type for attribute buffer References: bsc#1028716 Upstream: not yet The author probably wanted to make an array of fixed-length strings, but declared an array of pointers to strings... which gets initialized to NULL by calloc(). *sigh* Signed-off-by: Petr Tesarik <ptesarik@suse.com> --- plugin/metriczECKD.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/plugin/metriczECKD.c +++ b/plugin/metriczECKD.c @@ -160,7 +160,7 @@ char* readSysFs(char* deviceName) { ATTRIBUTES[attributeCount] != NULL; ++attributeCount); - char** attributeValues = calloc(attributeCount, 256); + char (*attributeValues)[256] = calloc(attributeCount, 256); if (attributeValues == NULL) { fprintf(stderr, "calloc() failed\n"); return NULL;
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