Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:kernel-2.6.32
libHX
libHX-hmc-fixes.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libHX-hmc-fixes.dif of Package libHX
Index: libHX-1.23/src/hmc.c =================================================================== --- libHX-1.23.orig/src/hmc.c +++ libHX-1.23/src/hmc.c @@ -70,10 +70,14 @@ EXPORT_SYMBOL hmc_t *hmc_memasg(hmc_t ** CHECK_IDENT(ctx); if (ctx->alloc < len) { ctx = realloc(ctx, sizeof(struct memcont) + len); + if (ctx == NULL) + return NULL; ctx->alloc = len; } } else { ctx = malloc(sizeof(struct memcont) + len); + if (ctx == NULL) + return NULL; ctx->id = HMC_IDENT; ctx->alloc = len; } @@ -102,12 +106,14 @@ EXPORT_SYMBOL hmc_t *hmc_trunc(hmc_t **v CHECK_IDENT(ctx); if (len > ctx->alloc) { ctx = realloc(ctx, sizeof(struct memcont) + len); + if (ctx == NULL) + return NULL; ctx->alloc = len; } else { ctx->data[len] = '\0'; ctx->length = len; } - return ctx->data; + return *vp = ctx->data; } EXPORT_SYMBOL hmc_t *hmc_strcat(hmc_t **vp, const char *s) @@ -125,6 +131,8 @@ EXPORT_SYMBOL hmc_t *hmc_memcat(hmc_t ** CHECK_IDENT(ctx); if (nl > ctx->alloc) { ctx = realloc(ctx, sizeof(struct memcont) + nl); + if (ctx == NULL) + return NULL; ctx->alloc = nl; } if (ptr == NULL) @@ -171,6 +179,8 @@ EXPORT_SYMBOL hmc_t *hmc_memins(hmc_t ** CHECK_IDENT(ctx); if (ctx->alloc < nl) { ctx = realloc(ctx, sizeof(struct memcont) + nl); + if (ctx == NULL) + return NULL; ctx->alloc = nl; } if (ptr == 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