Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
dalvik
Commits
19165357
Commit
19165357
authored
9 years ago
by
Aart Bik
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Download
Plain Diff
Merge "Fix potential buffer overrun."
parents
41dea6a0
a6502897
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
libdex/OptInvocation.cpp
libdex/OptInvocation.cpp
+5
-5
No files found.
libdex/OptInvocation.cpp
View file @
19165357
...
...
@@ -87,9 +87,9 @@ char* dexOptGenerateCacheFileName(const char* fileName, const char* subFileName)
ALOGE
(
"Can't get CWD while opening jar file"
);
return
NULL
;
}
strncat
(
absoluteFile
,
"/"
,
kBufLen
);
strncat
(
absoluteFile
,
"/"
,
kBufLen
-
strlen
(
absoluteFile
)
);
}
strncat
(
absoluteFile
,
fileName
,
kBufLen
);
strncat
(
absoluteFile
,
fileName
,
kBufLen
-
strlen
(
absoluteFile
)
);
/*
* Append the name of the Jar file entry, if any. This is not currently
...
...
@@ -97,8 +97,8 @@ char* dexOptGenerateCacheFileName(const char* fileName, const char* subFileName)
* in a Jar.
*/
if
(
subFileName
!=
NULL
)
{
strncat
(
absoluteFile
,
"/"
,
kBufLen
);
strncat
(
absoluteFile
,
subFileName
,
kBufLen
);
strncat
(
absoluteFile
,
"/"
,
kBufLen
-
strlen
(
absoluteFile
)
);
strncat
(
absoluteFile
,
subFileName
,
kBufLen
-
strlen
(
absoluteFile
)
);
}
/* Turn the path into a flat filename by replacing
...
...
@@ -136,7 +136,7 @@ char* dexOptGenerateCacheFileName(const char* fileName, const char* subFileName)
/* Tack on the file name for the actual cache file path.
*/
strncat
(
nameBuf
,
absoluteFile
,
kBufLen
);
strncat
(
nameBuf
,
absoluteFile
,
kBufLen
-
strlen
(
nameBuf
)
);
ALOGV
(
"Cache file for '%s' '%s' is '%s'"
,
fileName
,
subFileName
,
nameBuf
);
return
strdup
(
nameBuf
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment