fs/cromfs and tools/gencromfs: Various fixes for traversal relative file paths. Biggest changes is in types used: Cannot use size_t or mode_t in common structures because they have different sizes on the (64-bit) host and the (32-bit) target. Use uint32_t instead of size_t for offsets. Use uint16_t instead of mode_t.

This commit is contained in:
Gregory Nutt
2018-03-20 12:37:01 -06:00
parent 87fd4e2916
commit 22484386ee
5 changed files with 109 additions and 82 deletions
+7 -7
View File
@@ -111,20 +111,20 @@
/* Floating point types */
typedef float float32;
typedef float float32;
#ifndef CONFIG_HAVE_DOUBLE
typedef float double_t;
typedef float float64;
typedef float double_t;
typedef float float64;
#else
typedef double double_t;
typedef double float64;
typedef double double_t;
typedef double float64;
#endif
/* Misc. scalar types */
/* mode_t is an integer type used for file attributes. mode_t needs
* to be at least 16-bits but, in fact must be sizeof(int) because it is
* pased via varargs.
* to be at least 16-bits but, in fact, must be sizeof(int) because it is
* passed via varargs.
*/
typedef unsigned int mode_t;