From 278341083266625efa4103716f30f2dc51bd355e Mon Sep 17 00:00:00 2001
From: Brian Carrier <carrier@sleuthkit.org>
Date: Thu, 9 Apr 2009 00:47:26 +0000
Subject: [PATCH] Fixed typo bugs in sorter as reported by Drew Hunt.

---
 CHANGES.txt              | 2 ++
 tools/sorter/sorter.base | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 6d52807a3..b9d611ebc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -47,6 +47,8 @@ pad with 0s).  Fix by Bruce Nikkel.
 3/23/09: Bug Fix: Fixed bug  2708195, for long reads in fragmented
 attributes.  Reported and patch by Jamie Butler (Mandiant).
 
+4/8/09: Fixed typo bugs in sorter as reported by Drew Hunt. 
+
 
 ---------------- VERSION 3.0.0 -------------- 
 0/00/00: Update: Many, many, many API changes.
diff --git a/tools/sorter/sorter.base b/tools/sorter/sorter.base
index 1e272d717..a4d76df34 100644
--- a/tools/sorter/sorter.base
+++ b/tools/sorter/sorter.base
@@ -680,7 +680,7 @@ sub analyze_file {
             chomp $sha1;
         }
         if ($DO_MD5 == 1) {
-            $sha1 =
+            $md5 =
 `\"$SK_ICAT\" $IMGTYPE -o $IMGOFF $FSTYPE $recflag $IMG \"$inode\" | \"$SK_MD5\"`;
             chomp $md5;
         }
@@ -847,7 +847,7 @@ sub analyze_file {
                 # it will be considered a mismatch
                 $mismatch = 1;
 
-                $ext =~ tr/[A-Z]/[a-z/;
+                $ext =~ tr/[A-Z]/[a-z]/;
 
                 # cycle through each possible extension for this type
                 foreach my $cat_ext (@{$file_to_ext{$ext_kw}}) {
-- 
GitLab