Skip to content

Commit

Permalink
Fix rpmfile fails to load localized RPM headers
Browse files Browse the repository at this point in the history
#6
Return an array, and allow the user to deal with the issue.
There should not be any compatability options as we are the first to
use the library.
  • Loading branch information
Samson Danziger authored and pdxjohnny committed Nov 9, 2023
1 parent 185ac91 commit fffc9e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rpmfile/headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@


def extract_string(offset, count, store):
if count > 1:
return extract_array(offset, count, store)
assert count == 1
idx = store[offset:].index(b"\x00")
return store[offset : offset + idx]
Expand Down

0 comments on commit fffc9e7

Please sign in to comment.