Commit graph

28 commits

Author SHA1 Message Date
Günther Noack
878b30c0bc fspread: fix buffer overflow
Without this fix, fspread is trusting the server to return as much
data as requested, or less. If a server responds with more data
though, fspread writes beyond the bounds of the buffer to fill, which
is passed in by the caller. It depends on the caller of fspread()
where that buffer is, so there are various possible attack vectors.

In the Plan9 kernel, I found this implemented in devmnt.c, where
overly large responses are truncated to the size requested before
copying, so I assume that this strategy works here too.

This also affects fsread() and fsreadn(), which are based on
fspread().
2021-04-05 05:19:49 -04:00
Dan Cross
fa325e9b42 Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines.
Remove blank lines from the ends of files.
Change modes on source files so that they
are not executable.

Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-10 14:54:30 +00:00
Russ Cox
74dd032175 delete 9P2000.u
thanks to Erik Quanstrom

R=rsc
http://codereview.appspot.com/3469042
2010-12-07 13:34:11 -05:00
Russ Cox
06421c01b9 lib9pclient: clear tx.extension for 9P2000.u 2008-07-04 16:35:52 -04:00
Russ Cox
fc9fc9c831 lib9pclient: remove debugging print 2008-07-04 12:36:26 -04:00
Russ Cox
07125953ea lib9pclient: one more dotu (Michael Kaminsky) 2008-07-04 12:19:30 -04:00
Russ Cox
382ae73f24 lib9pclient: add support for 9P2000.u 2008-07-04 02:46:05 -04:00
rsc
73a5509ae9 more functions 2006-07-23 02:55:34 +00:00
rsc
13a17f7503 remove debug print 2006-06-26 00:06:36 +00:00
rsc
f53117fb6b set errstr for bad dir contents 2006-06-26 00:06:28 +00:00
rsc
5c419e0741 remove print statement 2006-06-26 00:06:09 +00:00
rsc
70a3bbd7d4 missed this too 2006-05-27 05:24:49 +00:00
rsc
8da12c958f missed this too 2006-05-27 05:20:01 +00:00
rsc
cbeb0b26e4 Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
rsc
5a1e9de7b1 add print 2006-02-08 21:21:01 +00:00
rsc
1ac60148eb add 2006-01-27 04:11:37 +00:00
rsc
8612247402 more 2006-01-27 04:08:41 +00:00
rsc
2d70c581f4 better error messages 2005-07-13 10:50:44 +00:00
rsc
22a88b6735 do not add to void* 2005-03-15 19:50:16 +00:00
rsc
c31f81ac8b open: preserve error on failed open
write: handle offset correctly for fswrite
2005-03-01 20:56:27 +00:00
rsc
59518849d8 add _fsunmount; do version in fsinit; add nsinit; add chatty9pclient 2005-02-11 17:00:46 +00:00
rsc
80ecfd2430 add auth 2005-02-08 21:03:12 +00:00
rsc
33baa59ecc better offset handling 2005-01-28 05:41:12 +00:00
rsc
6135dd6916 do not close -1 2005-01-19 03:53:20 +00:00
rsc
daefa1a92f add fsseek 2005-01-18 18:11:39 +00:00
rsc
162ef0743b update paths 2005-01-14 19:43:41 +00:00
rsc
b8f742db85 os x changes 2005-01-11 17:43:53 +00:00
rsc
46f79934b7 lib9pclient is the new libfs 2005-01-04 21:22:40 +00:00