/ Check-in [e39769f4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix an assertion fault found by OSSFuzz.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:e39769f442ea86273f8fb7bd2f249b7d760b2fe4bf9ec191ff91def8231f3f35
User & Date: drh 2017-04-22 00:20:49
Context
2017-04-24
14:16
When building an ephemeral table of integers, do not assume that the table does not already contain N if the insert cursor points to N-1. Fix for ticket [61fe9745]. check-in: 1c1b0862 user: dan tags: trunk
2017-04-22
00:20
Fix an assertion fault found by OSSFuzz. check-in: e39769f4 user: drh tags: trunk
2017-04-21
17:03
Remove a NEVER macro for a condition that may be true as of [a47efb7c]. Problem reported by OSSFuzz. check-in: bdc50d8d user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/date.c.

   419    419   static void computeYMD(DateTime *p){
   420    420     int Z, A, B, C, D, E, X1;
   421    421     if( p->validYMD ) return;
   422    422     if( !p->validJD ){
   423    423       p->Y = 2000;
   424    424       p->M = 1;
   425    425       p->D = 1;
          426  +  }else if( !validJulianDay(p->iJD) ){
          427  +    datetimeError(p);
          428  +    return;
   426    429     }else{
   427         -    assert( validJulianDay(p->iJD) );
   428    430       Z = (int)((p->iJD + 43200000)/86400000);
   429    431       A = (int)((Z - 1867216.25)/36524.25);
   430    432       A = Z + 1 + A - (A/4);
   431    433       B = A + 1524;
   432    434       C = (int)((B - 122.1)/365.25);
   433    435       D = (36525*(C&32767))/100;
   434    436       E = (int)((B-D)/30.6001);