git://git.openafs.org
/
openafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
b8b4b6c
)
rx-packet-version-not-all-kernels-have-snprintf-20010721
author
Garry Zacheiss
<zacheiss@mit.edu>
Sat, 21 Jul 2001 08:07:51 +0000 (08:07 +0000)
committer
Derrick Brashear
<shadow@dementia.org>
Sat, 21 Jul 2001 08:07:51 +0000 (08:07 +0000)
linux kernel for instance has no snprintf
src/rx/rx_packet.c
patch
|
blob
|
history
diff --git
a/src/rx/rx_packet.c
b/src/rx/rx_packet.c
index
5cdf7de
..
ce17d1e
100644
(file)
--- a/
src/rx/rx_packet.c
+++ b/
src/rx/rx_packet.c
@@
-1407,7
+1407,7
@@
struct rx_packet *rxi_ReceiveVersionPacket(ap, asocket, ahost, aport, istack)
ap->header.flags = ap->header.flags & ~RX_CLIENT_INITIATED;
rxi_EncodePacketHeader(ap);
bzero(buf, sizeof(buf));
- snprintf(buf, sizeof(buf), "%s", cml_version_number+4);
+ strncpy(buf, cml_version_number+4, sizeof(buf)-1);
rx_packetwrite(ap, 0, 65, buf);
tl = ap->length;
ap->length = 65;