Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at packet-x11.c:4478

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

dissect_x11_replies

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-x11.c)expand/collapse
Show more  
 4394  dissect_x11_replies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 4395  {
 4396  /* Set up structures we will need to add the protocol subtree and manage it */
 4397          volatile int offset, plen;
 4398          tvbuff_t * volatile next_tvb;
 4399          conversation_t *conversation;
 4400          x11_conv_data_t *volatile state;
 4401          gboolean little_endian;
 4402          int length_remaining;
 4403          const char *volatile sep = NULL;
 4404   
 4405   
 4406          /*
 4407          * Get the state for this conversation; create the conversation 
 4408          * if we don't have one, and create the state if we don't have 
 4409          * any.
 4410          */
 4411          conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
 4412[+]         pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
 4413          if (conversation == NULL) {
 4414                  /*
 4415                   * No - create one.
 4416                  */
 4417                  conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
 4418                  pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
 4419          }
 4420   
 4421          /*
 4422           * Is there state attached to this conversation?
 4423          */
 4424[+]         if ((state = conversation_get_proto_data(conversation, proto_x11))
 4425          == NULL) {
 4426                  /*
 4427                   * No - create a state structure and attach it.
 4428                   */
 4429                  state = x11_stateinit(conversation);
 4430          }
 4431   
 4432          /*
 4433           * Guess the byte order if we don't already know it.
 4434           */
 4435          little_endian = guess_byte_ordering(tvb, pinfo, state);
 4436   
 4437          offset = 0;
 4438[+]         while (tvb_reported_length_remaining(tvb, offset) != 0) {
 4439                  /*
 4440                   * We use "tvb_ensure_length_remaining()" to make sure there
 4441                   * actually *is* data remaining.
 4442                   *
 4443                   * This means we're guaranteed that "length_remaining" is 
 4444                   * positive.
 4445                   */
 4446                  length_remaining = tvb_ensure_length_remaining(tvb, offset);
 4447   
 4448                  /*
 4449                  * Can we do reassembly?
 4450                  */
 4451                  if (x11_desegment && pinfo->can_desegment) {
 4452                            /*
 4453                             * Yes - is the X11 reply header split across 
 4454                             * segment boundaries?
 4455                             */
 4456                            if (length_remaining < 8) {
 4457                                  /*
 4458                                   * Yes.  Tell the TCP dissector where the data
 4459                                   * for this message starts in the data it handed 
 4460                                   * us, and how many more bytes we need, and 
 4461                                   * return.
 4462                                   */
 4463                                  pinfo->desegment_offset = offset;
 4464                                  pinfo->desegment_len = 8 - length_remaining;
 4465                                  return;
 4466                          }
 4467                  }
 4468   
 4469                  /*
 4470                   * Find out what kind of a reply it is.
 4471                   * There are four possible:
 4472                   *      - reply to initial connection
 4473                   *      - errorreply (a request generated an error)
 4474                   *      - requestreply (reply to a request)
 4475                   *      - event (some event occured)
 4476                   */
 4477                  if (g_hash_table_lookup(state->seqtable,
 4478                      GINT_TO_POINTER(state->sequencenumber)) == (int *)INITIAL_CONN
Show more  




Change Warning 3063.34476 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: