Skip to content
Commit 808d7022 authored by Stefan Liebler's avatar Stefan Liebler Committed by Andreas Krebbel
Browse files

S390: Fix build error with gcc6 in utf8_utf16-z9.c.

This patch fixes the build error with gcc6:
array subscript is above array bounds [-Werror=array-bounds]

While including loop.c to construct the SINGLE(LOOPFCT) method
for converting from UTF-16 to UTF-8, the bytebuf array with length
MAX_NEEDED_INPUT is used as inptr. MAX_NEEDED_INPUT defaults to
MIN_NEEDED_INPUT if not defined before including loop.c.
Thus bytebuf has a length of 2.
This patch defines MAX_NEEDED_INPUT to MAX_NEEDED_TO, which is 4.

ChangeLog:

	* sysdeps/s390/s390-64/utf8-utf16-z9.c
	(MAX_NEEDED_INPUT): New define.
	(MAX_NEEDED_OUTPUT): New define.
parent 1efad39b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment