summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornlscc <66028747+nlscc@users.noreply.github.com>2020-10-24 14:33:15 +0200
committernlscc <66028747+nlscc@users.noreply.github.com>2020-10-24 14:33:15 +0200
commitc71818549e97a96e9a59cd2f11e175cd9ec4cb70 (patch)
tree1761ab6bf1a0c25bb261bb18b0dd4bd2c7e5fff4
parentCalculate proper download remainder size when resuming a download. (#21) (diff)
downloadsamloader-c71818549e97a96e9a59cd2f11e175cd9ec4cb70.tar
samloader-c71818549e97a96e9a59cd2f11e175cd9ec4cb70.tar.gz
samloader-c71818549e97a96e9a59cd2f11e175cd9ec4cb70.tar.bz2
samloader-c71818549e97a96e9a59cd2f11e175cd9ec4cb70.tar.lz
samloader-c71818549e97a96e9a59cd2f11e175cd9ec4cb70.tar.xz
samloader-c71818549e97a96e9a59cd2f11e175cd9ec4cb70.tar.zst
samloader-c71818549e97a96e9a59cd2f11e175cd9ec4cb70.zip
-rw-r--r--samloader/request.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/samloader/request.py b/samloader/request.py
index e19d072..47619d8 100644
--- a/samloader/request.py
+++ b/samloader/request.py
@@ -6,6 +6,8 @@
import xml.etree.ElementTree as ET
def getlogiccheck(inp, nonce):
+ if len(inp) < 16:
+ raise Exception("getlogiccheck() input too short")
out = ""
for c in nonce:
out += inp[ord(c) & 0xf]