From 4e7d4aa77664cc77c00e9c6221c65e01c3c94a0d Mon Sep 17 00:00:00 2001
From: devttys0 <heffnercj@gmail.com>
Date: Thu, 15 Oct 2015 13:08:23 -0400
Subject: [PATCH] Added python3 compatibility string conversion to ubivalid.py plugin

---
 src/binwalk/plugins/ubivalid.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/binwalk/plugins/ubivalid.py b/src/binwalk/plugins/ubivalid.py
index 619de0d..186fb3c 100755
--- a/src/binwalk/plugins/ubivalid.py
+++ b/src/binwalk/plugins/ubivalid.py
@@ -1,7 +1,7 @@
 import struct
 import binascii
 import binwalk.core.plugin
-
+import binwalk.core.compat
 
 class UBIValidPlugin(binwalk.core.plugin.Plugin):
     '''
@@ -56,7 +56,7 @@ class UBIValidPlugin(binwalk.core.plugin.Plugin):
             # Seek to and read the suspected UBI erase count header
             fd = self.module.config.open_file(result.file.name, offset=result.offset)
 
-            ec_header = fd.read(1024)
+            ec_header = binwalk.core.compat.str2bytes(fd.read(1024))
             fd.close()
 
             result.valid = self._check_crc(ec_header[0:64])
--
libgit2 0.26.0