由C中的SIGSEGV信号终止

我正在写一个C程序,它读取bmp图像的宽度和高度( http://smsoftdev-solutions.blogspot.com.au/2014/07/code-for-reading-bmp-image-files.html ) 。 但我在终端遇到错误,它表明:

i './a.out' terminated by signal SIGSEGV (Address boundary error) 

我做了一些谷歌搜索,他们提到它正在访问额外的内存问题,但我无法真正发现在我的代码中,任何建议将不胜感激

 #include  struct __attribute__((__packed__)) BitmapHeader { int width; int height; }; void loadBmp(char* filePath, struct BitmapHeader bmpHeaderInfo){ FILE* filePtr = fopen(filePath, "rb"); unsigned char header[54]; fread(header, sizeof(unsigned char), 54, filePtr); } int main(){ char path2BMP[] = "/cup.bmp"; struct BitmapHeader bmpHeaderInfo = {0}; loadBmp(path2BMP, bmpHeaderInfo); return 0; }