aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
Diffstat (limited to 'archival')
-rw-r--r--archival/rpm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/archival/rpm.c b/archival/rpm.c
index 309b55a36..27c6b78a1 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -324,7 +324,7 @@ static char *rpm_getstr(int tag, int itemindex)
324 return NULL; 324 return NULL;
325 if (found[0]->type == RPM_STRING_TYPE || found[0]->type == RPM_I18NSTRING_TYPE || found[0]->type == RPM_STRING_ARRAY_TYPE) { 325 if (found[0]->type == RPM_STRING_TYPE || found[0]->type == RPM_I18NSTRING_TYPE || found[0]->type == RPM_STRING_ARRAY_TYPE) {
326 int n; 326 int n;
327 char *tmpstr = (char *) (map + found[0]->offset); 327 char *tmpstr = (char *) map + found[0]->offset;
328 for (n=0; n < itemindex; n++) 328 for (n=0; n < itemindex; n++)
329 tmpstr = tmpstr + strlen(tmpstr) + 1; 329 tmpstr = tmpstr + strlen(tmpstr) + 1;
330 return tmpstr; 330 return tmpstr;
@@ -343,7 +343,7 @@ static int rpm_getint(int tag, int itemindex)
343 if (!found || itemindex >= found[0]->count) 343 if (!found || itemindex >= found[0]->count)
344 return -1; 344 return -1;
345 345
346 tmpint = (int *) (map + found[0]->offset); 346 tmpint = (int *) ((char *) map + found[0]->offset);
347 347
348 if (found[0]->type == RPM_INT32_TYPE) { 348 if (found[0]->type == RPM_INT32_TYPE) {
349 tmpint = (int *) ((char *) tmpint + itemindex*4); 349 tmpint = (int *) ((char *) tmpint + itemindex*4);