Text   |  XML   |  ReML   |   Visible Warnings:

Cast Alters Value  at scanner.c:1512

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

yy_get_next_buffer

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dfilter/scanner.c)expand/collapse
Show more  
 1421  static int yy_get_next_buffer (void)
 1422  {
 1423          register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
 1424          register char *source = (yytext_ptr);
 1425          register int number_to_move, i;
 1426          int ret_val;
 1427   
 1428          if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
 1429                  YY_FATAL_ERROR(
 1430                  "fatal flex scanner internal error--end of buffer missed" );
 1431   
 1432          if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
 1433                  { /* Don't try to fill the buffer, so this is an EOF. */
 1434                  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
 1435                          {
 1436                          /* We matched a single character, the EOB, so 
 1437                           * treat this as a final EOF.
 1438                           */
 1439                          return EOB_ACT_END_OF_FILE;
 1440                          }
 1441   
 1442                  else 
 1443                          {
 1444                          /* We matched some text prior to the EOB, first 
 1445                           * process it.
 1446                           */
 1447                          return EOB_ACT_LAST_MATCH;
 1448                          }
 1449                  }
 1450   
 1451          /* Try to read more data. */
 1452   
 1453          /* First move last chars to start of buffer. */
 1454          number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
 1455   
 1456          for ( i = 0; i < number_to_move; ++i )
 1457                  *(dest++) = *(source++);
 1458   
 1459          if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
 1460                  /* don't do the read, it's not guaranteed to return an EOF,
 1461                   * just force an EOF
 1462                   */
 1463                  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
 1464   
 1465          else 
 1466                  {
 1467                          int num_to_read =
 1468                          YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 1469   
 1470                  while ( num_to_read <= 0 )
 1471                          { /* Not enough room in the buffer - grow it. */
 1472   
 1473                          /* just a shorter name for the current buffer */
 1474                          YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
 1475   
 1476                          int yy_c_buf_p_offset =
 1477                                  (int) ((yy_c_buf_p) - b->yy_ch_buf);
 1478   
 1479                          if ( b->yy_is_our_buffer )
 1480                                  {
 1481
1496
Show [ Lines 1481 to 1496 omitted. ]
 1497                                  YY_FATAL_ERROR(
 1498                                  "fatal error - scanner input buffer overflow" );
 1499   
 1500                          (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
 1501   
 1502                          num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
 1503                                                  number_to_move - 1;
 1504   
 1505                          }
 1506   
 1507                  if ( num_to_read > YY_READ_BUF_SIZE )
 1508                          num_to_read = YY_READ_BUF_SIZE;
 1509   
 1510                  /* Read in more data. */
 1511                  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
 1512                          (yy_n_chars), (size_t) num_to_read );
Show more  




Change Warning 1133.30256 : Cast Alters Value

Because they are very similar, this warning shares annotations with warnings 1133.30267, 1133.30269, 1133.30275, and 1133.30303.

Priority:
State:
Finding:
Owner:
Note: