Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-26702

Coverity scan reported new defects related to code generator

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Not specified
    • Resolution: Invalid
    • master
    • None
    • Code Generator
    • None
    • OBT

    Description

      The reported errors are:

       

      CID Type Impact Status Action Component Category File Function
      1143179 Dereference after null check Medium New Undecided Code Generator Null pointer dereferences build-master-2021-10-18_10-01-35/ecl/hql/hqllex.cpp eclyyrestart
      1142620 Dereference after null check Medium New Undecided Code Generator Null pointer dereferences build-master-2021-10-18_10-01-35/ecl/hql/hqllex.cpp eclyy_switch_to_buffer
      1142402 Dereference after null check Medium New Undecided Code Generator Null pointer dereferences build-master-2021-10-18_10-01-35/ecl/hql/hqllex.cpp eclyypush_buffer_state

       

      *** CID 1143179:  Null pointer dereferences  (FORWARD_NULL)
      /home/vamosax/build/CE/platform/build-master-2021-10-18_10-01-35/ecl/hql/hqllex.cpp: 7520 in eclyyrestart(_IO_FILE *, void *)()
      7514         void eclyyrestart  (FILE * input_file , yyscan_t yyscanner)
      7515     {
      7516         struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
      7517
      7518            if ( ! YY_CURRENT_BUFFER ){
      7519             eclyyensure_buffer_stack (yyscanner);
      >>>     CID 1143179:  Null pointer dereferences  (FORWARD_NULL)
      >>>     Dereferencing null pointer "yyg->yy_buffer_stack".
      7520                    YY_CURRENT_BUFFER_LVALUE =
      7521                 eclyy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
      7522            }
      7523
      7524            eclyy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
      7525            eclyy_load_buffer_state(yyscanner );
      
      ________________________________________________________________________________________________________
      *** CID 1142620:  Null pointer dereferences  (FORWARD_NULL)
      /home/vamosax/build/CE/platform/build-master-2021-10-18_10-01-35/ecl/hql/hqllex.cpp: 7553 in eclyy_switch_to_buffer(yy_buffer_state *, void *)()
      7547                    /* Flush out information for old buffer. */
      7548                    *yyg->yy_c_buf_p = yyg->yy_hold_char;
      7549                    YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
      7550                    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      7551                    }
      7552
      >>>     CID 1142620:  Null pointer dereferences  (FORWARD_NULL)
      >>>     Dereferencing null pointer "yyg->yy_buffer_stack".
      7553            YY_CURRENT_BUFFER_LVALUE = new_buffer;
      7554            eclyy_load_buffer_state(yyscanner );
      7555
      7556            /* We don't actually know whether we did this switch during
      7557             * EOF (eclyywrap()) processing, but the only time this flag
      7558             * is looked at is after eclyywrap() is called, so it's safe
      
      ________________________________________________________________________________________________________
      *** CID 1142402:  Null pointer dereferences  (FORWARD_NULL)
      /home/vamosax/build/CE/platform/build-master-2021-10-18_10-01-35/ecl/hql/hqllex.cpp: 7706 in eclyypush_buffer_state(yy_buffer_state *, void *)()
      7700                    YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      7701                    }
      7702
      7703            /* Only push if top exists. Otherwise, replace top. */
      7704            if (YY_CURRENT_BUFFER)
      7705                    yyg->yy_buffer_stack_top++;
      >>>     CID 1142402:  Null pointer dereferences  (FORWARD_NULL)
      >>>     Dereferencing null pointer "yyg->yy_buffer_stack".
      7706            YY_CURRENT_BUFFER_LVALUE = new_buffer;
      7707
      7708            /* copied from eclyy_switch_to_buffer. */
      7709            eclyy_load_buffer_state(yyscanner );
      7710            yyg->yy_did_buffer_switch_on_eof = 1;
      7711     }
       

       

      To view the defects in Coverity Scan visit:

      https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fu15810271.ct.sendgrid.net%2Fls%2Fclick%3Fupn%3DHRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypQjb0hTUkvcp9raSmREwFq6YYouACn74NAOJog3t-2B9hwML-2BjS1JaRteOgFFK87Rag-3DvBwU_8MqIhCRnGbt-2F8erpzfaQPKt49wIYlz1MQCVtEp8qAdEKFEpqZyszZVK0VMvDiW4F8HmzQTliB9ZE-2FXuxmndDu-2FNY2lsvX7kK0yZvK6RMX96nV4aoFs-2FuwfG6WC6zIqNNxEFsirbjaYF4RlNbkf6vqCcrjHv6KdCs4liMeGjgTUFjfj2vOXu979ejhEifIL6s3qV4G9DDzxDJuSnkHl17CXDaJ1087HfSIAiKa79xULs-3D&data=04%7C01%7Cattila.vamos%40lexisnexis.com%7Ca97adff99c9049d4171408d99227374c%7C9274ee3f94254109a27f9fb15c10675d%7C0%7C0%7C637701519401680214%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wVBr6sOTcvcVyd2uqYpH0NpkASnKof%2FKdqnhhGY4n5M%3D&reserved=0

      Attachments

        Activity

          People

            Unassigned Unassigned
            attilavamos Attila Vamos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: