K 10 svn:author V 3 imp K 8 svn:date V 27 2017-12-27T18:30:24.715615Z K 7 svn:log V 908 Fix a bunch of issues (and a few non-issues but appeasement is easier than arguing) Coverity found: o Use open + fstat rather than stat + open to avoid any races for a file that's static for the life of the system. This will prevent any problems should someone insert a new device while installing a kernel in the future. o Use strlcpy instead of strcpy as a failsafe to knowing that the strings can't possibly be larger than the buffer due to data source limits (though in the future these limits might be more dynamic). o If we can't find the hints file, return rather than dereference a NULL pointer. o Check for lastmod before calling strcmp in case a PNP entry comes before a module entry. That's not allowed, but within the realm of crazy things programmers do. o Free lastmod before exiting search_hints() to avoid a leak. CID: 1383971, 1383970, 1383969, 1383965, 1383963, 1383960 END