Changeset 30625 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Feb 27, 2008, 9:13:46 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Sam Weinig.

http://bugs.webkit.org/show_bug.cgi?id=17030
Small buffer overflow within initialization

  • kjs/date_object.cpp: (KJS::DateObjectFuncImp::callAsFunction): (KJS::parseDate): Remove unnecessary and incorrect memset() calls - GregorianDateTime can initialize itself.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/date_object.cpp

    r30453 r30625  
    550550
    551551    GregorianDateTime t;
    552     memset(&t, 0, sizeof(t));
    553552    int year = args[0]->toInt32(exec);
    554553    t.year = (year >= 0 && year <= 99) ? year : year - 1900;
     
    917916    if (!haveTZ) {
    918917        GregorianDateTime t;
    919         memset(&t, 0, sizeof(tm));
    920918        t.monthDay = day;
    921919        t.month = month;
Note: See TracChangeset for help on using the changeset viewer.