| Index: WebCore/platform/UUID.cpp
|
| ===================================================================
|
| --- WebCore/platform/UUID.cpp (revision 67662)
|
| +++ WebCore/platform/UUID.cpp (working copy)
|
| @@ -84,10 +84,11 @@
|
| FILE* fptr = fopen("/proc/sys/kernel/random/uuid", "r");
|
| if (!fptr)
|
| return String();
|
| - char uuidStr[37] = {0};
|
| - if (!fgets(uuidStr, sizeof(uuidStr) - 1, fptr))
|
| + char uuidStr[37];
|
| + char* result = fgets(uuidStr, sizeof(uuidStr), fptr);
|
| + fclose(fptr);
|
| + if (!result)
|
| return String();
|
| - fclose(fptr);
|
| String canonicalUuidStr = String(uuidStr).lower(); // make it lower.
|
| ASSERT(canonicalUuidStr[uuidVersionIdentifierIndex] == uuidVersionRequired);
|
| return canonicalUuidStr;
|
|
|