mirror of
https://github.com/platomav/BIOSUtilities.git
synced 2025-05-13 06:34:42 -04:00
Improved AMI UCP > NAL unpacking
Fix potential illegal path traversals
This commit is contained in:
parent
672b4b2321
commit
40686d5edf
13 changed files with 102 additions and 43 deletions
|
@ -3,4 +3,13 @@
|
|||
|
||||
# Generate padding (spaces or tabs)
|
||||
def padder(padd_count, tab=False):
|
||||
return ('\t' if tab else ' ') * padd_count
|
||||
return ('\t' if tab else ' ') * padd_count
|
||||
|
||||
# Get String from given input object
|
||||
def to_string(input_object, sep_char=''):
|
||||
if type(input_object).__name__ in ('list','tuple'):
|
||||
output_string = sep_char.join(map(str, input_object))
|
||||
else:
|
||||
output_string = str(input_object)
|
||||
|
||||
return output_string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue