freebsd-dev/stand/libsa
Ian Lepore b6f4732cb3 Add a validbcd() routine that uses the bcd2bin_data[] array and returns a
bool indicating whether the input value represents a valid BCD byte.

The existing bcd2bin() routine will KASSERT if asked to convert a bad value,
but sometimes the kernel has to handle BCD data from untrusted sources, so
this will provide a mechanism to validate data before attempting conversion.

This would be have easier/cleaner if the bcd2bin_data[] array contained an
out-of-range value (such as 0xff) in the infill locations that aren't valid,
but it's a global symbol that might be referenced by out-of-tree code
relying on the current scheme, so I'm leaving that alone.
2017-12-31 22:43:24 +00:00
..
amd64
i386
mips
powerpc
sparc64
__main.c
arp.c
assert.c
bcd.c
bootp.c dhcp_try_rfc1048() is not used any more 2017-12-06 06:49:53 +00:00
bootp.h dhcp_try_rfc1048() is not used any more 2017-12-06 06:49:53 +00:00
bootparam.c
bootparam.h
bzipfs.c
cd9660.c Use the kernel relative paths, rather than the userland relative paths 2017-12-05 21:37:50 +00:00
close.c
closeall.c
crc32.c
crc32.h
dev.c
dosfs.c
dosfs.h
environment.c Make putenv and getenv match the userland definition of these 2017-12-06 02:00:00 +00:00
ether.c
ext2fs.c
fstat.c
getopt.c
gets.c
globals.c
gpt.c Remove the 'mini libstand in libstand' that util.[ch] provided. These 2017-12-15 23:16:53 +00:00
gpt.h
gzipfs.c
in_cksum.c
inet_ntoa.c
ioctl.c
iodesc.h
ip.c
libstand.3 Make putenv and getenv match the userland definition of these 2017-12-06 02:00:00 +00:00
lseek.c
Makefile libsa: Pull in strnlen from libc 2017-12-30 07:03:52 +00:00
Makefile.depend
nandfs.c
net.c
net.h
netif.c
netif.h
nfs.c
nfsv2.h
nullfs.c
open.c
pager.c
panic.c
pkgfs.c
printf.c
qdivrem.c
quad.h
random.c Fix random() and srandom() prototypes to match the standard. 2017-12-02 00:07:19 +00:00
rarp.c
read.c
readdir.c
rpc.c
rpc.h
rpcv2.h
saioctl.h
sbrk.c Panic in sbrk if setheap hasn't been called yet. This is preferable to 2017-12-15 23:16:47 +00:00
splitfs.c
stand.h Add a validbcd() routine that uses the bcd2bin_data[] array and returns a 2017-12-31 22:43:24 +00:00
stat.c
strcasecmp.c
strdup.c
strerror.c
strtol.c
strtoul.c
tftp.c
tftp.h
twiddle.c
udp.c
ufs.c
ufsread.c
uuid_from_string.c
uuid_to_string.c
write.c
zalloc_defs.h
zalloc_malloc.c
zalloc_mem.h
zalloc_protos.h
zalloc.c