git.samba.org
/
sahlberg
/
dbench.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9158e9d
)
dont try to modify offset if size is 0
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Fri, 12 Mar 2010 17:20:25 +0000
(
04:20
+1100)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Fri, 12 Mar 2010 17:20:25 +0000
(
04:20
+1100)
it will generate a division by zero fault and crash the thread
libnfs.c
patch
|
blob
|
history
diff --git
a/libnfs.c
b/libnfs.c
index 3f60eff5210775ca09ede0793479236ec8b03bf8..915526aa0d3790a47c7318d60fd82f2c0b620290 100644
(file)
--- a/
libnfs.c
+++ b/
libnfs.c
@@
-831,7
+831,7
@@
nfsstat3 nfsio_read(struct nfsio *nfsio, const char *name, char *buf, uint64_t o
goto finished;
}
- if (offset >= size) {
+ if (offset >= size
&& size > 0
) {
offset = offset % size;
}
if (offset+len >= size) {