Files
s390-tools/cmsfs-fuse
Gerald Schaefer 6f7cb68dcf cmsfs-fuse: Fix iconv buffer aliasing
GCC8 shows the following compile warning:

cmsfs-fuse.c: In function ‘convert_text’:
cmsfs-fuse.c:2558:19: warning: passing argument 2 to restrict-qualified
parameter aliases with argument 4 [-Wrestrict]
  rc = iconv(conv, &data_ptr, &in_count, &data_ptr, &out_count);
                   ^~~~~~~~~             ~~~~~~~~~

Fix this by using a separate buffer for iconv. The buffer size depends on
the record format: variable-length records have a maximum length of
MAX_RECORD_LEN (plus 1 byte for linefeed), while fixed-length records
could be larger in theory. This patch takes that into account for the iconv
buffer, but the rest of the code currently cannot handle fixed-length records
larger than MAX_RECORD_LEN.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2018-12-13 15:57:25 +01:00
..
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00