diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2010-11-17 16:38:35 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2010-11-17 16:38:35 +0000 |
commit | ed0d2ad3cef21e96e2d1bc33db4d7d8266d81a5b (patch) | |
tree | 5e4ae46be88e2bdc95950ab0ed4b810e8f479730 | |
parent | 486da338ac249d2c15885182e922e3630c511909 (diff) | |
download | perl-URPM-ed0d2ad3cef21e96e2d1bc33db4d7d8266d81a5b.tar perl-URPM-ed0d2ad3cef21e96e2d1bc33db4d7d8266d81a5b.tar.gz perl-URPM-ed0d2ad3cef21e96e2d1bc33db4d7d8266d81a5b.tar.bz2 perl-URPM-ed0d2ad3cef21e96e2d1bc33db4d7d8266d81a5b.tar.xz perl-URPM-ed0d2ad3cef21e96e2d1bc33db4d7d8266d81a5b.zip |
ditch legacy compatibility use of headerPut() causing segfault (#61690)
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | URPM.xs | 11 |
2 files changed, 4 insertions, 12 deletions
@@ -1,4 +1,7 @@ -Version 4.0 - ? October 2010, by Per Øyvind Karlsen +Version 4.1 - 17 Nov 2010, by Per Øyvind Karlsen +- ditch legacy compatibility use of headerPut() causing segfault (#61690) + +Version 4.0 - 11 Nov 2010, by Per Øyvind Karlsen - add support for uncompressed & xz/lzma compressed synthesis - fix URPM::DB::open() to work properly with relative paths @@ -94,8 +94,6 @@ typedef struct s_Package* URPM__Package; #define FLAG_RATE_INVALID 0 -#define FILENAME_TAG 1000000 - #define FILTER_MODE_ALL_FILES 0 #define FILTER_MODE_CONF_FILES 2 @@ -1391,20 +1389,11 @@ update_header(char *filename, URPM__Package pkg, __attribute__((unused)) int kee if (fd != NULL && rpmReadPackageFile(ts, fd, filename, &header) == 0 && header) { char *basename; struct stat sb; - HE_t he; basename = strrchr(filename, '/'); Fstat(fd, &sb); Fclose(fd); - /* this is only kept for compatibility with older distros - (where ->filename on "unpacked" URPM::Package rely on FILENAME_TAG) */ - he = (HE_t)memset(alloca(sizeof(*he)), 0, sizeof(*he)); - he->tag = FILENAME_TAG; - he->p.str = basename != NULL ? basename + 1 : filename; - he->c = 1; - headerPut(header, he, 0); - if (pkg->h && !(pkg->flag & FLAG_NO_HEADER_FREE)) pkg->h = headerFree(pkg->h); pkg->h = header; pkg->flag &= ~FLAG_NO_HEADER_FREE; |