Author: kirilla Date: 2011-02-24 09:33:35 +0100 (Thu, 24 Feb 2011) New Revision: 40657 Changeset: http://dev.haiku-os.org/changeset/40657 Modified: haiku/trunk/src/apps/deskbar/TimeView.cpp haiku/trunk/src/apps/deskbar/TimeView.h Log: CID 9835 UNINIT_CTOR - removing leftovers from 12/24 interval option CID 8960 STRING_OVERFLOW CID 6788, 6789 SECURE_CODING Modified: haiku/trunk/src/apps/deskbar/TimeView.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/TimeView.cpp 2011-02-24 08:08:11 UTC (rev 40656) +++ haiku/trunk/src/apps/deskbar/TimeView.cpp 2011-02-24 08:33:35 UTC (rev 40657) @@ -80,6 +80,8 @@ { fTime = fLastTime = time(NULL); fSeconds = fMinute = fHour = 0; + fTimeStr[0] = 0; + fDateStr[0] = 0; fLastTimeStr[0] = 0; fLastDateStr[0] = 0; fNeedToUpdate = true; @@ -94,7 +96,6 @@ { fTime = fLastTime = time(NULL); data->FindBool("seconds", &fShowSeconds); - data->FindBool("interval", &fInterval); fLocale = *BLocale::Default(); } @@ -122,7 +123,6 @@ { BView::Archive(data, deep); data->AddBool("seconds", fShowSeconds); - data->AddBool("interval", fInterval); data->AddInt32("deskbar:private_align", B_ALIGN_RIGHT); return B_OK; @@ -268,7 +268,7 @@ if (str[0] == '0') str++; - strcpy(fDateStr, str); + strlcpy(fDateStr, str, sizeof(fDateStr)); } @@ -329,8 +329,8 @@ || !fLastTimeStr[0]) Update(); - strcpy(fLastTimeStr, fTimeStr); - strcpy(fLastDateStr, fDateStr); + strlcpy(fLastTimeStr, fTimeStr, sizeof(fLastTimeStr)); + strlcpy(fLastDateStr, fDateStr, sizeof(fLastDateStr)); fNeedToUpdate = true; } @@ -338,7 +338,6 @@ fSeconds = ct->tm_sec; fMinute = ct->tm_min; fHour = ct->tm_hour; - fInterval = ct->tm_hour >= 12; Draw(Bounds()); fNeedToUpdate = false; Modified: haiku/trunk/src/apps/deskbar/TimeView.h =================================================================== --- haiku/trunk/src/apps/deskbar/TimeView.h 2011-02-24 08:08:11 UTC (rev 40656) +++ haiku/trunk/src/apps/deskbar/TimeView.h 2011-02-24 08:33:35 UTC (rev 40657) @@ -103,7 +103,6 @@ int fSeconds; int fMinute; int fHour; - bool fInterval; bool fShowInterval; bool fShowSeconds;