diff options
author | Thierry Vignaud <tv@mandriva.org> | 2006-11-29 22:21:06 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2006-11-29 22:21:06 +0000 |
commit | 731629ff2296573c9a4f953183892b6dde4ac732 (patch) | |
tree | b376f45cc86a566a1ba5ccbb6b18221de990b2b2 | |
parent | 001783e1f3383ef2b17b3b94938c24cdec34df10 (diff) | |
download | perl-URPM-731629ff2296573c9a4f953183892b6dde4ac732.tar perl-URPM-731629ff2296573c9a4f953183892b6dde4ac732.tar.gz perl-URPM-731629ff2296573c9a4f953183892b6dde4ac732.tar.bz2 perl-URPM-731629ff2296573c9a4f953183892b6dde4ac732.tar.xz perl-URPM-731629ff2296573c9a4f953183892b6dde4ac732.zip |
(Trans_add) fix segfault on ia32 (when one replace "struct foobar" by
"foobar*", he should expect sizeof() to *slightly* differ in results)
-rw-r--r-- | URPM.xs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2689,7 +2689,11 @@ Trans_add(trans, pkg, ...) if (SvROK(ST(i+1)) && SvTYPE(SvRV(ST(i+1))) == SVt_PVAV) { AV *excludepath = (AV*)SvRV(ST(i+1)); I32 j = 1 + av_len(excludepath); +#ifdef RPM_446 + relocations = calloc(j + 2, sizeof(*relocations)); +#else relocations = calloc(2 + av_len(excludepath), sizeof(rpmRelocation)); +#endif while (--j >= 0) { SV **e = av_fetch(excludepath, j, 0); relocations[j].newPath = NULL; |