CVS commit: src/sys

2018-07-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jul 25 07:55:45 UTC 2018

Modified Files:
src/sys/dev/ic: bwi.c
src/sys/dev/pci: if_txp.c
src/sys/dev/ppbus: if_plip.c
src/sys/net: bpf.c
src/sys/netisdn: i4b_ipr.c

Log Message:
 Initialize some members in a mbuf which is on stack.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/ic/bwi.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/if_txp.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/ppbus/if_plip.c
cvs rdiff -u -r1.226 -r1.227 src/sys/net/bpf.c
cvs rdiff -u -r1.45 -r1.46 src/sys/netisdn/i4b_ipr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2018-07-25 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Wed Jul 25 11:09:22 UTC 2018

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
Enhance logical volume integrity descriptor handling and provide
bug-compatibility for Linux mkudffs 1.3 images.


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch

2018-07-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Jul 25 11:47:07 UTC 2018

Modified Files:
src/sys/arch/amd64/include: pmap.h
src/sys/arch/i386/include: pmap.h

Log Message:
Remove NPTECL, unused.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/amd64/include/pmap.h
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/i386/include/pmap.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/printf

2018-07-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jul 25 14:41:52 UTC 2018

Modified Files:
src/usr.bin/printf: printf.c

Log Message:
NFC: whitespace & KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/printf/printf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/sh

2018-07-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jul 25 14:42:50 UTC 2018

Modified Files:
src/bin/sh: eval.c eval.h exec.c

Log Message:
Fix several bugs in the command / type builtin ( including PR bin/48499 )

1. Make command -pv (and -pV) work (which is not as easy as the PR
   suggests it might be (the "check and cause error" was there because
   it did not work, not in order to prevent it from working).

2. Stop -v and -V being both used (that makes no sense).

3. Stop the "type" builtin inheriting the args (-pvV) that "command" has
   (which it did, as when -v -or -V is used with command, it and type are
implemented using the same code).

4. make "command -v word" DTRT for sh keywords (was treating them as an error).

5. Require at least one arg for "command -[vV]" or "type" else usage & error.
   Strictly this should also apply to "command" and "command -p" (no -v)
   but that's handled elsewhere, so perhaps some other time.   Perhaps
   "command -v" (and -V) should be limited to 1 command name (where "type"
   can have many) as in the POSIX definitions, but I don't think that matters.

6. With "command -V alias", (or "type alias" which is the same thing),
   (but not "command -v alias") alter the output format, so we get
ll is an alias for: ls -al
   instead of the old
ll is an alias for
ls -al
   (and note there was a space, for some reason, after "for")

   That is, unless the alias value contains any \n characters, in which
   case (something approximating) the old multi-line format is retained.
   Also note: that if code wants to parse/use the value of an alias, it
   should be using the output of "alias name", not command or type.

Note that none of the above affects "command [-p] cmd" (no -v or -V options)
only "command -[vV]" and "type".

Note also that the changes to eval.[ch] are merely to make syspath()
visible in exec.c rather than static in eval.c


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/bin/sh/eval.c
cvs rdiff -u -r1.19 -r1.20 src/bin/sh/eval.h
cvs rdiff -u -r1.52 -r1.53 src/bin/sh/exec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/printf

2018-07-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jul 25 15:35:27 UTC 2018

Modified Files:
src/usr.bin/printf: printf.c

Log Message:
NFC: More KNF (remove () around returned constants).


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/printf/printf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/MesaLib7/dist/src/mesa/drivers/dri/r300

2018-07-25 Thread Kamil Rytarowski
Module Name:xsrc
Committed By:   kamil
Date:   Wed Jul 25 18:52:53 UTC 2018

Modified Files:
xsrc/external/mit/MesaLib7/dist/src/mesa/drivers/dri/r300:
r300_render.h

Log Message:
Avoid Undefined Behavior in r300_render.h

Specify R300_FALLBACK_INVALID_BUFFERS without altering signed bit.

Requested by GCC when building with Undefined Behavior Sanitizer.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/MesaLib7/dist/src/mesa/drivers/dri/r300/r300_render.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/xf86-video-r128/dist/src

2018-07-25 Thread Kamil Rytarowski
Module Name:xsrc
Committed By:   kamil
Date:   Wed Jul 25 18:54:43 UTC 2018

Modified Files:
xsrc/external/mit/xf86-video-r128/dist/src: r128_reg.h

Log Message:
Avoid Undefined Behavior in r128_reg.h

Specify symbols without altering signed bit.

Requested by GCC when building with Undefined Behavior Sanitizer.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xf86-video-r128/dist/src/r128_reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/bta2dpd/bta2dpd

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 19:03:50 UTC 2018

Modified Files:
src/usr.sbin/bta2dpd/bta2dpd: avdtp.c

Log Message:
Avoid potential undefined behavior in bta2dpd(8)

The operator >> causes implicit promotion to int.

There is need to cast the result back to uint8_t in order to save the
return value to a data undef a pointe of type uint8_t.

Requested by GCC when building with Undefined Behavior Sanitizer.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/bta2dpd/bta2dpd/avdtp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/netbt

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 19:09:38 UTC 2018

Modified Files:
src/sys/netbt: hci.h

Log Message:
Appease GCC in hci_filter_test()

Cast the returned value from hci_filter_test explicitly to int, as
requested by GCC when building with Undefined Behavior Sanitizer.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/netbt/hci.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/pci

2018-07-25 Thread Lars Reichardt
Module Name:src
Committed By:   para
Date:   Wed Jul 25 19:10:41 UTC 2018

Modified Files:
src/sys/arch/x86/pci: amdzentemp.c

Log Message:
adjust for possible 49K offset

presence of this offset is indicated by a set 19th bit which is shifted away
this brings the temperature to "normal" levels on my ryzen 2700
(I assumed the same 49K offset as the k10temp project)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/x86/pci/amdzentemp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/mk

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 19:15:19 UTC 2018

Modified Files:
src/share/mk: bsd.README

Log Message:
Document the default value of MKSANITIZER in bsd.README

This value is set to "no".


To generate a diff of this commit:
cvs rdiff -u -r1.379 -r1.380 src/share/mk/bsd.README

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 19:56:56 UTC 2018

Modified Files:
src/sys/fs/udf: ecma167-udf.h

Log Message:
Avoid undefined behavior in ecma167-udf.h

Define the UDF_EXT_* symbols as unsigned values.
This prevents undefined behavior of altering the signedness bit in a part
of them. Swap the remaining symbols to unsigned values to keep the
consistency.

Required by GCC when building with Undefined Behavior Sanitizer.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/fs/udf/ecma167-udf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/stdlib

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 20:05:35 UTC 2018

Modified Files:
src/lib/libc/stdlib: jemalloc.c

Log Message:
Avoid undefined behavior in left bit shift in jemalloc(3)

Change the type of shifted value to unsigned to prevent altering the
signedness bit.

jemalloc.c:1707:14, left shift of 1 by 31 places cannot be represented in type 
'int'
jemalloc.c:1724:15, left shift of 1 by 31 places cannot be represented in type 
'int'
jemalloc.c:1840:28, left shift of 1 by 31 places cannot be represented in type 
'int'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/lib/libc/stdlib/jemalloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/include/sys

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 21:51:32 UTC 2018

Modified Files:
src/tests/include/sys: t_types.c

Log Message:
Avoid undefined behavior in an ATF test: t_types

Replace UB with implementation defined logic to check whether ssize_t can
wrap to a negative number.

t_types.c:63:7, signed integer overflow: 9223372036854775807 + 1 cannot be 
represented in type 'long int'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/include/sys/t_types.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/include/sys

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 22:00:32 UTC 2018

Modified Files:
src/tests/include/sys: t_bitops.c

Log Message:
Avoid undefined behavior in an ATF test: t_bitops

Do not change the signedness bit with a left shift operation.
Switch to unsigned integer to prevent this.

t_bitops.c:189:9, left shift of 1 by 31 places cannot be represented in type 
'int'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/tests/include/sys/t_bitops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/msdosfs

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 22:07:59 UTC 2018

Modified Files:
src/sys/fs/msdosfs: msdosfs_fat.c

Log Message:
Avoid undefined behavior semantics in msdosfs_fat.c

Do not change signedness bit with left shift.
While there avoid signed integer overflow.
Address both issues with using unsigned type.

msdosfs_fat.c:512:42, left shift of 1 by 31 places cannot be represented in 
type 'int'
msdosfs_fat.c:521:44, left shift of 1 by 31 places cannot be represented in 
type 'int'
msdosfs_fat.c:744:14, left shift of 1 by 31 places cannot be represented in 
type 'int'
msdosfs_fat.c:744:24, signed integer overflow: -2147483648 - 1 cannot be 
represented in type 'int [20]'
msdosfs_fat.c:840:13, left shift of 1 by 31 places cannot be represented in 
type 'int'
msdosfs_fat.c:840:36, signed integer overflow: -2147483648 - 1 cannot be 
represented in type 'int [20]'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/fs/msdosfs/msdosfs_fat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/mk

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 23:30:22 UTC 2018

Modified Files:
src/share/mk: bsd.README

Log Message:
Document MKLIBCSANITIZER in bsd.README

It's a special kind of a sanitizer inside libc.


To generate a diff of this commit:
cvs rdiff -u -r1.380 -r1.381 src/share/mk/bsd.README

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/mk

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 23:34:25 UTC 2018

Modified Files:
src/share/mk: bsd.lib.mk bsd.own.mk bsd.prog.mk bsd.sys.mk

Log Message:
Introduce MKLIBCSANITIZER in the share/mk rules

Add flags that are required to build a program and a dynamically loaded
library.

Propagade LIBCSANITIZERFLAGS to CFLAGS and CXXFLAGS.

LDFLAGS is not changed on purpose, as a libcsanitizer is inside libc
and no external dependencies are needed.

Register NOLIBCSANITIZER, as certain distribution parts will need to be
skipped.


To generate a diff of this commit:
cvs rdiff -u -r1.376 -r1.377 src/share/mk/bsd.lib.mk
cvs rdiff -u -r1.1071 -r1.1072 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.316 -r1.317 src/share/mk/bsd.prog.mk
cvs rdiff -u -r1.284 -r1.285 src/share/mk/bsd.sys.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/crunch/crunchgen

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 23:41:28 UTC 2018

Modified Files:
src/usr.bin/crunch/crunchgen: crunchgen.1 crunchgen.c

Log Message:
Introduce a new option -S in crunchgen(1)

The -S argument enables sanitization with a sanitizer in libc.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/crunch/crunchgen/crunchgen.1
cvs rdiff -u -r1.87 -r1.88 src/usr.bin/crunch/crunchgen/crunchgen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 23:45:32 UTC 2018

Modified Files:
src/sys/arch/amd64/stand/prekern: Makefile
src/sys/arch/i386/stand: Makefile.booters Makefile.inc
src/sys/arch/i386/stand/boot: Makefile.boot
src/sys/arch/i386/stand/bootxx: Makefile.bootxx
src/sys/arch/i386/stand/efiboot: Makefile.efiboot
src/sys/arch/i386/stand/fatboot: Makefile.fat
src/sys/arch/i386/stand/mbr: Makefile.mbr

Log Message:
Specify NOLIBCSANITIZER in x86 bootloader-like code under sys/arch/

Set NOLIBCSANITIZER for i386 and amd64 specific bootloader-like code.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/stand/prekern/Makefile
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/i386/stand/Makefile.booters
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/i386/stand/Makefile.inc
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/i386/stand/boot/Makefile.boot
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/i386/stand/bootxx/Makefile.bootxx
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/stand/efiboot/Makefile.efiboot
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/i386/stand/fatboot/Makefile.fat
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/i386/stand/mbr/Makefile.mbr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/rescue

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 23:52:38 UTC 2018

Modified Files:
src/rescue: Makefile

Log Message:
Specify NOLIBCSANITIZER for rescue

The rescue image could be sanitized with a sanitizer in libc, but it's left
for future as a possible research.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/rescue/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/rpc

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jul 25 23:59:08 UTC 2018

Modified Files:
src/lib/libc/rpc: xdr_rec.c

Log Message:
Avoid undefined behavior in the definition of LAST_FRAG in xdr_rec.c

Do not change the signedness bit with a left shift operation.
Switch to unsigned integer to prevent this in the LAST_FRAG symbol.

xdr_rec.c:559:39, left shift of 1 by 31 places cannot be represented in type 
'int'
xdr_rec.c:572:26, left shift of 1 by 31 places cannot be represented in type 
'int'
xdr_rec.c:573:25, left shift of 1 by 31 places cannot be represented in type 
'int'
xdr_rec.c:632:37, left shift of 1 by 31 places cannot be represented in type 
'int'
xdr_rec.c:711:32, left shift of 1 by 31 places cannot be represented in type 
'int'
xdr_rec.c:722:28, left shift of 1 by 31 places cannot be represented in type 
'int'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libc/rpc/xdr_rec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/gen

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jul 26 00:05:28 UTC 2018

Modified Files:
src/lib/libc/gen: ftok.c

Log Message:
Avoid undefined behavior in ftok(3)

Do not change the signedness bit with a left shift operation.
Cast to unsigned integer to prevent this.

ftok.c:56:10, left shift of 123456789 by 24 places cannot be represented in 
type 'int'
ftok.c:56:10, left shift of 4160 by 24 places cannot be represented in type 
'int'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/gen/ftok.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/common/lib/libc/sys

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jul 26 00:13:19 UTC 2018

Modified Files:
src/common/lib/libc/sys: cpuset.c

Log Message:
Avoid undefined behavior in an cpuset.c

Do not change the signedness bit with a left shift operation.
Switch to unsigned integer to prevent this.

cpuset.c:112:18, left shift of 1 by 31 places cannot be represented in type 
'int'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/common/lib/libc/sys/cpuset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/common/lib/libc/inet

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jul 26 00:20:41 UTC 2018

Modified Files:
src/common/lib/libc/inet: inet_addr.c

Log Message:
Avoid undefined behavior in an inet_addr.c

Do not change the signedness bit with a left shift operation.
Cast to unsigned integer to prevent this.

inet_addr.c:218:20, left shift of 131 by 24 places cannot be represented in 
type 'int'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/inet/inet_addr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgpverify

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jul 26 00:26:45 UTC 2018

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/netpgpverify: pgpsum.c

Log Message:
Avoid undefined behavior in netpgpverify

Do not change the signedness bit with a left shift operation.
Cast to unsigned integer to prevent this.

pgpsum.c:187:18, left shift of 130 by 24 places cannot be represented in type 
'int'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/netpgp/dist/src/netpgpverify/pgpsum.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgpverify

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jul 26 00:31:13 UTC 2018

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/netpgpverify: sha2.c

Log Message:
Avoid undefined behavior in netpgpverify/sha2.c

Do not change the signedness bit with a left shift operation.
Cast to unsigned integer to prevent this.

sha2.c:79:16, left shift of 154 by 24 places cannot be represented in type 'int'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/netpgp/dist/src/netpgpverify/sha2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/common/lib/libutil

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jul 26 00:33:26 UTC 2018

Modified Files:
src/common/lib/libutil: snprintb.c

Log Message:
Avoid undefined behavior in snprintb.c

Do not change the signedness bit with a left shift operation.
Switch to unsigned integer to prevent this.

snprintb.c:178:17, left shift of 1 by 31 places cannot be represented in type 
'int'

Detected with micro-UBSan in the user mode.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/common/lib/libutil/snprintb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/csu

2018-07-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Thu Jul 26 01:25:23 UTC 2018

Modified Files:
src/lib/csu: Makefile

Log Message:
Specify NOLIBCSANITIZER in lib/csu

The low-level libraries in csu are used in non-sanitized code.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/csu/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.