提交 da791b32 编写于 作者: F FangzhenLi-hust 提交者: Jiangtao Hu

Local fix (#1699)

* fix coding style

* fix conflict

* fix security bug
上级 2a34dc8f
......@@ -157,6 +157,7 @@ bool FileUtil::GetFileContent(const string& path, string* content) {
size = ::read(fd, data + has_read, fsize - has_read);
if (size < 0) {
AWARN << "failed to read file: " << path;
::close(fd);
return false;
}
has_read += size;
......
......@@ -563,6 +563,11 @@ void GLFWViewer::GetClassColor(int cls, float rgb[3]) {
rgb[1] = 0;
rgb[2] = 0; // red
break;
default:
rgb[0] = 1;
rgb[1] = 1;
rgb[2] = 1; // white
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册