]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC various libsa fixes: r337037-r337039, r337065, r337412-r337413, r337874,
authorkevans <kevans@FreeBSD.org>
Thu, 21 Feb 2019 02:43:48 +0000 (02:43 +0000)
committerkevans <kevans@FreeBSD.org>
Thu, 21 Feb 2019 02:43:48 +0000 (02:43 +0000)
commitca72dbec9716196623defb6dc3d296a7e6dbc84b
tree548214b95c7794a1b57be9a8c64120ec00b57fee
parent80d3bfe098d90136d183fcd338c2c6a339f01d8e
MFC various libsa fixes: r337037-r337039, r337065, r337412-r337413, r337874,
r338535, r338540, r339651, r339992-r339993, r340026

r337037:
libsa: pointer differs in signedness

A small cleanup, fix the argument type and while there, replace (char *)0 with
NULL.

r337038:
libsa: bootp is using pointers with different sign

Just change bp_file to char and same for variable s.

r337039:
libsa: assignment to char * from u_char *

Cast to char * instead of u_char *

r337065:
libsa: dereferencing type-punned pointer in cd9660

The warning is given by gcc build, but it is good to fix anyhow.
use bcopy instead of direct assignment.

r337412:
libsa: dos_checksum() should take unsigned chars

Fix pointers to integers with different sign issue.

r337413:
libsa: gzipfs.c converts pointers to integer types with different sign

Signed versus unsigned char.

r337874:
libsa: zfs_probe() needs to set spa to NULL

Silence the warning about possibly uninitialized use of spa.

r338535:
libsa: memory leak in tftp_open()

tftpfile is allocated just above and needs to be freed.

r338540:
libsa: validate tftp_makereq() after we did reset the read

The name check referred in the comment is not the only possible error source,
we need to validate the result.

r339651:
libsa: re-send ACK for older data packets in tftp

In current tftp code we drop out-of-order packets; however, we should play
nice and re-send ACK for older data packets we are receiving. This will
hopefully stop server repeating those packets we already have received.
Note we do not answer duplicates from "previous" session (that is, session
with different port number), those will eventually time out.

r339992:
libsa: tftp should not read past file end

When we have the file size via tsize option, use it to make sure we
will not attempt to read past file end.

r339993:
libsa: tftp should use calloc

instead of malloc() memset(), use calloc().

r340026:
libsa: cstyle cleanup tftp.c

No functinal changes intended.
stand/libsa/bootp.c
stand/libsa/bootp.h
stand/libsa/cd9660.c
stand/libsa/cd9660read.c
stand/libsa/dosfs.c
stand/libsa/gzipfs.c
stand/libsa/net.c
stand/libsa/nfs.c
stand/libsa/tftp.c
stand/libsa/zfs/zfs.c