[trivial] Minor issue in link.c

Buffer is supposed to be initialized in fread() but it may return 0 without initializing it and without setting stream in error state.