headerlist.c: getXMLPackageNFV: fix extending data structures with multiple rich requirements
This commit is contained in:
parent
c7eb144bb1
commit
f5e33d9f50
@ -33,6 +33,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
@ -458,6 +459,8 @@ resolveFirstLevelDependencies(struct configTag *ct, int archidx)
|
||||
}
|
||||
// currheader->require.resolved = malloc(sizeof(struct providedList*)*currheader->requirecount);
|
||||
for (i = 0; i < currheader->requirecount; i++) {
|
||||
assert(currheader->require[i] != NULL);
|
||||
assert(currheader->require[i]->name != NULL);
|
||||
if (!strncmp("executable(",currheader->require[i]->name,11)) {
|
||||
/* dynamic requirement for executable file */
|
||||
/*fprintf(stderr,"Warning: skipping unhandled requirement %s for package %s\n",
|
||||
|
@ -924,9 +924,9 @@ void getXMLPackageNFV(xmlNode *parent, char ***name,
|
||||
char **newname = malloc(sizeof(char*) * *count);
|
||||
uint_32 *newflags = malloc(sizeof(uint_32) * *count);
|
||||
char **newversion = malloc(sizeof(char*) * *count);
|
||||
memcpy(newname, *name, sizeof(name));
|
||||
memcpy(newflags, *flags, sizeof(flags));
|
||||
memcpy(newversion, *version, sizeof(version));
|
||||
memcpy(newname, *name, sizeof(char*) * (*count -1));
|
||||
memcpy(newflags, *flags, sizeof(uint_32) * (*count - 1));
|
||||
memcpy(newversion, *version, sizeof(char*) * (*count - 1));
|
||||
free(*name);
|
||||
free(*flags);
|
||||
free(*version);
|
||||
|
Loading…
Reference in New Issue
Block a user