Fix wrong _create_bin_int implementation in pssh-box.py

#885.
This commit is contained in:
Qingquan(Q.Q.) Wang 2021-01-31 03:45:50 +08:00 committed by GitHub
parent 2eb32ee177
commit a6cce5e611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -38,6 +38,7 @@ Kongqun Yang <kqyang@google.com>
Leandro Moreira <leandro.ribeiro.moreira@gmail.com> Leandro Moreira <leandro.ribeiro.moreira@gmail.com>
Leo Law <leoltlaw.gh@gmail.com> Leo Law <leoltlaw.gh@gmail.com>
Piotr Srebrny <srebrny.piotr@gmail.com> Piotr Srebrny <srebrny.piotr@gmail.com>
Qingquan Wang <wangqq1103@gmail.com>
Richard Eklycke <richard@eklycke.se> Richard Eklycke <richard@eklycke.se>
Rintaro Kuroiwa <rkuroiwa@google.com> Rintaro Kuroiwa <rkuroiwa@google.com>
Sanil Raut <sr1990003@gmail.com> Sanil Raut <sr1990003@gmail.com>

View File

@ -142,8 +142,7 @@ def _split_list_on(elems, sep):
def _create_bin_int(value): def _create_bin_int(value):
"""Creates a binary string as 4-byte array from the given integer.""" """Creates a binary string as 4-byte array from the given integer."""
return (chr(value >> 24) + chr((value >> 16) & 0xff) + return struct.pack('>i', value)
chr((value >> 8) & 0xff) + chr(value & 0xff)).encode()
def _create_uuid(data): def _create_uuid(data):