Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix various bugs found by OSS-Fuze.
  • Loading branch information
kevina committed Aug 4, 2019
1 parent 00f937e commit 80fa26c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/config.cpp
Expand Up @@ -763,7 +763,7 @@ namespace acommon {
}
res.append(':');
}
if (res.back() == ':') res.pop_back();
if (!res.empty() && res.back() == ':') res.pop_back();
}

struct ListAddHelper : public AddableContainer
Expand Down
1 change: 1 addition & 0 deletions common/file_util.cpp
Expand Up @@ -181,6 +181,7 @@ namespace acommon {
while ( (dir = els.next()) != 0 )
{
path = dir;
if (path.empty()) continue;
if (path.back() != '/') path += '/';
unsigned dir_len = path.size();
path += filename;
Expand Down
2 changes: 1 addition & 1 deletion common/getdata.cpp
Expand Up @@ -64,7 +64,7 @@ namespace acommon {
char * unescape(char * dest, const char * src)
{
while (*src) {
if (*src == '\\') {
if (*src == '\\' && src[1]) {
++src;
switch (*src) {
case 'n': *dest = '\n'; break;
Expand Down

0 comments on commit 80fa26c

Please sign in to comment.