https://github.com/N-BodyShop/changa
Revision 5fc50e324f199c27f60370c95bd205c1a33b0608 authored by Tim Haines on 10 December 2017, 10:35:00 UTC, committed by Tim Haines on 27 October 2018, 19:46:28 UTC
Compiling with gcc-7.2 and later warngs that calculated string sizes
could possibly be larger than the buffer size. This also fixes possible
stack-smashing in dumpframe.cpp:dfReadColorMapFile.

Usage of DumpFrameContext.FileName could not be changed without
altering the layout of DumpFrameContext, so it was left alone.

Change-Id: Ib57f3d868ce0e37251658e9778c88fc4dc66ac82
1 parent f9a522d
Raw File
Tip revision: 5fc50e324f199c27f60370c95bd205c1a33b0608 authored by Tim Haines on 10 December 2017, 10:35:00 UTC
Fix possible buffer overflows in calls to sprintf
Tip revision: 5fc50e3
CUDAMoments.h
#ifndef CUDAMoments_h
#define CUDAMoments_h 1

#include "cuda_typedef.h"

/** CUDA version of momEvalFmomrcm. */
#ifdef CUDA_UNIT_TEST
__global__ void
#else
__device__ inline void __attribute__(( always_inline ))
#endif
CUDA_momEvalFmomrcm(const CudaMultipoleMoments* _m,
                    const CudaVector3D* _r,
                    cudatype dir,
                    CudaVector3D* out,
                    cudatype* pot);

#endif  /* CUDAMoments_h */
back to top