https://bugs.linaro.org/show_bug.cgi?id=2030

            Bug ID: 2030
           Summary: CID 157957:  Memory - illegal
                    accesses:odp_sysinfo_parse.c
           Product: OpenDataPlane - linux- generic reference
           Version: 1.6
          Hardware: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: ---
         Component: General ODP
          Assignee: lng-odp@lists.linaro.org
          Reporter: mike.hol...@linaro.org

platform/linux-generic/arch/x86/odp_sysinfo_parse.c: 23 in odp_cpuinfo_parser()

      strcpy(sysinfo->cpu_arch_str, "x86");
      while (fgets(str, sizeof(str), file) != NULL && id < MAX_CPU_NUMBER) {
              pos = strstr(str, "model name");
              if (pos) {
                      pos = strchr(str, ':');
>>>     CID 157957:  Memory - illegal accesses  (BUFFER_SIZE_WARNING)
>>>     Calling strncpy with a maximum size argument of 128 bytes on 
>>> destination array "sysinfo->model_str[id]" of size 128 bytes might leave 
>>> the destination string unterminated.
                      strncpy(sysinfo->model_str[id], pos + 2,
                              sizeof(sysinfo->model_str[id]));

                      pos = strchr(sysinfo->model_str[id], '@');
                      *(pos - 1) = '\0';
                      if (sscanf(pos, "@ %lfGHz", &ghz) == 1) {

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to