VC++5.0でコンパイルしました。

FILE *fp;
char buff[1024];

fp = fopen("hoge.txt", "r");
if (fp == NULL) return;
while (fgets(buff, sizeof(buff), fp) != NULL) {
printf("%s", buff);
}
fclose(fp);

というプログラムでfopen時にはfpはNULLではないのに
fgets()の途中でNULLになってしまうことはありますか?

下記のエラーが出ました。

Debug Assertion Failed!

Program c:\hoge.exe
File: fgets.c
Line: 60

Expression: str != NULL

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)

よろしくお願いします。