unsigned char buf[MAX_BUF_SIZE];
char filename[MAX_FILENAME];
+ memset(buf,0,sizeof(buf));
+
strcpy(filename,argv[1]);
file_size=atoi(argv[2]);
}
read(file_fd,&buf,MAX_TITLE);
+ buf[MAX_TITLE-1]=0;
printf("title: %s<br>\n",buf);
read(file_fd,&buf,MAX_ARTIST);
+ buf[MAX_ARTIST-1]=0;
printf("artist: %s<br>\n",buf);
read(file_fd,&buf,MAX_ALBUM);
+ buf[MAX_ALBUM-1]=0;
printf("album: %s<br>\n",buf);
// read(file_fd,&buf,MAX_YEAR);