Skip to content

Commit ca86100

Browse files
committed
paranoid compiler fix
1 parent b09007c commit ca86100

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/version.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ namespace mongo {
112112
f.open("/proc/self/numa_maps", /*read_only*/true);
113113
if ( f.is_open() && ! f.bad() ) {
114114
char line[100]; //we only need the first line
115-
read(f.fd, line, sizeof(line));
115+
assert( read(f.fd, line, sizeof(line)) <= 100 );
116116

117117
// just in case...
118118
line[98] = ' ';

0 commit comments

Comments
 (0)