Re: [master] logging: refactor printLogHeader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/16/2010 07:21 PM, Brian C. Lane wrote:
+    level_name = log_level_to_str[level];
+    fprintf(outfile, "%02d:%02d:%02d,%03d %s %s: ", t->tm_hour,
+            t->tm_min, t->tm_sec, msecs, level_name, tag);
  }

level needs a check on it to make sure it is valid. I tried out a
snippet of code to test this and unless you pass it one of the
initializers it will segfault.

This should be safer now when the loglevel is an enum type.

Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux