https://github.com/N-BodyShop/changa
Revision 210f115c289db4a1c9123483863fd225fc3a5819 authored by Tim Haines on 10 December 2017, 10:35:00 UTC, committed by Tim Haines on 22 October 2018, 21:06:50 UTC
Compiling with gcc-7.2 shows calculated string sizes possibly larger than buffer size. This also fixes undefined behavior in dumpframe.dfReadColorMapFile.

Change-Id: Ib57f3d868ce0e37251658e9778c88fc4dc66ac82
1 parent f9a522d
Raw File
Tip revision: 210f115c289db4a1c9123483863fd225fc3a5819 authored by Tim Haines on 10 December 2017, 10:35:00 UTC
Fix possible buffer overflows in calls to sprintf
Tip revision: 210f115
cosmoType.h
#ifndef __COSMOTYPE_H__
#define __COSMOTYPE_H__

/* #define COSMO_FLOAT */

#ifdef COSMO_FLOAT
#define CONVERT_TO_COSMO_TYPE (float)
typedef float cosmoType;
#define COSMO_CONST(val) val##f
#else
#define CONVERT_TO_COSMO_TYPE
typedef double cosmoType;
#define COSMO_CONST(val) val
#endif

#endif
back to top