centos 6
shell weakness #20

4

Weakness Breakdown


Definition:

A shell weakness occurs when a program enables an attacker to execute unexpected commands on the operating system.

Warning code(s):

This causes a new program to execute and is difficult to use safely.

File Name:

gst-plugins-good-0.10.23/ext/dv/gstsmptetimecode.c

Context:

The highlighted line of code below is the trigger point of this particular Centos 6 shell weakness.

           24 * ((time_code->hours * 60 + time_code->minutes) * 60 +
          time_code->seconds);
      break;
  }
  frame += time_code->frames;

  if (frame_number) {
    *frame_number = frame;
  }

  return TRUE;
}

/**
 * gst_smpte_time_get_timestamp:
 * @system: SMPTE Time Code system
 * @time_code: pointer to time code structure
 *
 * Converts the time code structure to a timestamp.
 *
 * Returns: Time stamp for time code, or GST_CLOCK_TIME_NONE if time
 *   code is invalid.
 */
GstClockTime
gst_smpte_time_code_get_timestamp (GstSMPTETimeCodeSystem system,
    GstSMPTETimeCode * time_code)
{
  int frame_number;

  g_return_val_if_fail (GST_SMPTE_TIME_CODE_SYSTEM_IS_VALID (system),
      GST_CLOCK_TIME_NONE);
  g_return_val_if_fail (time_code != NULL, GST_CLOCK_TIME_NONE);

  if (gst_smpte_time_code_get_frame_number (system, &frame_number, time_code)) {
    static int framerate_n[3] = { 3000, 25, 24 };
    static int framerate_d[3] = { 1001, 1, 1 };

    return gst_util_uint64_scale (frame_number,
        GST_SECOND * framerate_d[system], framerate_n[system]);
  }

  return GST_CLOCK_TIME_NONE;
} 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.