* lib/stdio-impl.h (fp_): On Android, change the type of _offset to
'long'.
* lib/fflush.c (update_fpos_cache): On Android, update a 'long', not an
'fpos_t'.
+2023-01-17 Bruno Haible <bruno@clisp.org>
+
+ fflush: Fix a buffer overrun on 32-bit Android.
+ * lib/stdio-impl.h (fp_): On Android, change the type of _offset to
+ 'long'.
+ * lib/fflush.c (update_fpos_cache): On Android, update a 'long', not an
+ 'fpos_t'.
+
2023-01-17 Bruno Haible <bruno@clisp.org>
execute tests: Avoid test failure on Android.
{
# if defined __sferror || defined __DragonFly__ || defined __ANDROID__
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-# if defined __CYGWIN__
+# if defined __CYGWIN__ || defined __ANDROID__
/* fp_->_offset is typed as an integer. */
fp_->_offset = pos;
# else
unsigned char _nbuf[1]; \
struct { unsigned char *_base; size_t _size; } _lb; \
int _blksize; \
- fpos_t _offset; \
+ long _offset; \
/* More fields, not relevant here. */ \
} *) fp)
# else