sh: Avoid negative character values from $'\Uffffffff' etc.
authorjilles <jilles@FreeBSD.org>
Thu, 20 Aug 2015 22:05:55 +0000 (22:05 +0000)
committerjilles <jilles@FreeBSD.org>
Thu, 20 Aug 2015 22:05:55 +0000 (22:05 +0000)
commit5e4f40c860b60f76a46b999cdc2606ac287a975c
tree05d618ef5ca7326b6ea958cfab1a7b22de13d4f4
parent4485ab4d3d63c821390eecb708c6ba6bfccdbe8f
sh: Avoid negative character values from $'\Uffffffff' etc.

The negative value was not expected and generated the low 8 bits as a byte,
which may be an invalid character encoding.

The final shift in creating the negative value was undefined as well.

Make the temporary variable unsigned to fix this.
bin/sh/parser.c
bin/sh/tests/parser/Makefile
bin/sh/tests/parser/dollar-quote13.0 [new file with mode: 0644]