From kde-devel Tue Jan 06 20:42:14 1998 From: "Russ Steffen" Date: Tue, 06 Jan 1998 20:42:14 +0000 To: kde-devel Subject: Bug in kaudioserver X-MARC-Message: https://marc.info/?l=kde-devel&m=88665911615270 There is a small bug in kaudioserver. Here is the relevent section, circa line 129 // Read old communication id KMServerPidHandle = fopen(KMServerPidFile,"r"); if (KMServerPidHandle == NULL) PidRead[0]=0; else fgets(PidRead, 100, KMServerPidHandle); fclose(KMServerPidHandle); If the fopen() fails, as it will when there is no pid file, the call to fclose will segfault. The fclose needs to go into the else clause. Russ -- ---------------------------------- Russ Steffen rsteffen@ia.net