projects
/
GitHub
/
LineageOS
/
G12
/
android_hardware_amlogic_tools_dtbtool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bcf770e
)
Fix input dir edge case bug.
author
Wilhansen Li
<wil@byimplication.com>
Mon, 26 Dec 2016 13:55:39 +0000
(21:55 +0800)
committer
Wilhansen Li
<wil@byimplication.com>
Mon, 26 Dec 2016 13:55:39 +0000
(21:55 +0800)
dtbTool.c
patch
|
blob
|
blame
|
history
diff --git
a/dtbTool.c
b/dtbTool.c
index db99bc8b22302d1a65afde369986f9799f7bb69b..eb792e48cbec4ea9707626159437ddac0d1329de 100644
(file)
--- a/
dtbTool.c
+++ b/
dtbTool.c
@@
-123,7
+123,7
@@
int parse_commandline(int argc, char *const argv[])
input_dir = optarg;
{
int len = strlen(input_dir);
- if ( len >
0
&& input_dir[len - 2] != '/' ) {
+ if ( len >
1
&& input_dir[len - 2] != '/' ) {
input_dir = malloc(len + 2);
strcpy(input_dir, optarg);
input_dir[len] = '/';