[PATCH isomd5sum f15-branch] Allocate one more char for string sentinel. (#692135)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Radek Vykydal <rvykydal@xxxxxxxxxxxxxx>

Adding last fragment sum to the string causes corruption
of mediasum value and check fail.
---
 libcheckisomd5.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libcheckisomd5.c b/libcheckisomd5.c
index afcd198..8bca842 100644
--- a/libcheckisomd5.c
+++ b/libcheckisomd5.c
@@ -189,8 +189,8 @@ static int checkmd5sum(int isofd, char *mediasum, char *computedsum, checkCallba
     unsigned int len;
     unsigned char *buf;
     long long isosize, offset, pvd_offset, apoff;
-    char fragmentsums[FRAGMENT_SUM_LENGTH];
-    char thisfragsum[FRAGMENT_SUM_LENGTH];
+    char fragmentsums[FRAGMENT_SUM_LENGTH+1];
+    char thisfragsum[FRAGMENT_SUM_LENGTH+1];
     long long fragmentcount = 0;
     MD5_CTX md5ctx, fragmd5ctx;
 
-- 
1.7.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux