aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2012-08-10 23:53:33 +0000
committerPascal Terjan <pterjan@mageia.org>2012-08-10 23:53:33 +0000
commit3093688d4264f5c53bb0fa6dafca3b65e8875b5b (patch)
tree7ed8c2a68e6f4ce0c723dca7e0c8ca7c172229b3 /URPM.xs
parentca28862a178c8988d0dafb5c8386f8f1652f553a (diff)
downloadperl-URPM-3093688d4264f5c53bb0fa6dafca3b65e8875b5b.tar
perl-URPM-3093688d4264f5c53bb0fa6dafca3b65e8875b5b.tar.gz
perl-URPM-3093688d4264f5c53bb0fa6dafca3b65e8875b5b.tar.bz2
perl-URPM-3093688d4264f5c53bb0fa6dafca3b65e8875b5b.tar.xz
perl-URPM-3093688d4264f5c53bb0fa6dafca3b65e8875b5b.zip
Don't read/write after the string when the synthesis is slightly malformed
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/URPM.xs b/URPM.xs
index b0338b1..b7a6462 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1759,7 +1759,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);