aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-13 19:11:28 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-13 19:11:28 +0000
commit67079ebff7a5a6d43d70df1c1a574c10172d0129 (patch)
tree76f27c7dc0fc392829dd46aa04d8eaeda4ea00ea
parent02db8b54afdaf113d72a0ed518aa2ac35fe198dd (diff)
downloadperl-URPM-67079ebff7a5a6d43d70df1c1a574c10172d0129.tar
perl-URPM-67079ebff7a5a6d43d70df1c1a574c10172d0129.tar.gz
perl-URPM-67079ebff7a5a6d43d70df1c1a574c10172d0129.tar.bz2
perl-URPM-67079ebff7a5a6d43d70df1c1a574c10172d0129.tar.xz
perl-URPM-67079ebff7a5a6d43d70df1c1a574c10172d0129.zip
Don't read/write after the string when the synthesis is slightly malformed
(backported from trunk)
-rw-r--r--NEWS3
-rw-r--r--URPM.xs2
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 082bbdf..2b4af68 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- don't read/write after the string when the synthesis is slightly
+ malformed
+
Version 3.38.1.1 - 29 February 2012
- do not add FILENAME_TAG to hdlist anymore (unused since mdv2008)
diff --git a/URPM.xs b/URPM.xs
index 149e5f2..091cd10 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1906,7 +1906,7 @@ Pkg_filename(pkg)
if (pkg->info) {
char *eon;
- if ((eon = strchr(pkg->info, '@')) != NULL) {
+ if ((eon = strchr(pkg->info, '@')) != NULL && strlen(eon) >= 3) {
char savbuf[4];
memcpy(savbuf, eon, 4); /* there should be at least epoch and size described so (@0@0 minimum) */
memcpy(eon, ".rpm", 4);