We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a140080 + b91d74b commit 54d1325Copy full SHA for 54d1325
src/libnpfs/fcall.c
@@ -413,7 +413,7 @@ np_read(Npreq *req, Npfcall *tc)
413
np_logerr (conn->srv, "read: invalid fid");
414
goto done;
415
}
416
- if (tc->u.tread.count + IOHDRSZ > conn->msize) {
+ if ((u64)(tc->u.tread.count) + IOHDRSZ > conn->msize) {
417
np_uerror(EIO);
418
np_logerr (conn->srv, "read: count %u too large",
419
tc->u.tread.count);
@@ -484,7 +484,7 @@ np_write(Npreq *req, Npfcall *tc)
484
np_uerror(EROFS);
485
486
487
- if (tc->u.twrite.count + IOHDRSZ > conn->msize) {
+ if ((u64)(tc->u.twrite.count) + IOHDRSZ > conn->msize) {
488
489
np_logerr (conn->srv, "write: count %u too large",
490
tc->u.twrite.count);
0 commit comments