Check-in [5acacab000]
Overview
SHA1:5acacab0009aaaea5cb319348f8298c8eaa29618
Date: 2016-02-19 17:50:50
User: rkeene
Comment:ChromeOS: Fix a potential free(NULL) in initialization of PCSC-NaCl
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-02-26
16:23
[42d0db67a2] ChromeOS: Updated to delete the entire retry queue when we are done with it (user: rkeene, tags: trunk)
2016-02-19
17:50
[5acacab000] ChromeOS: Fix a potential free(NULL) in initialization of PCSC-NaCl (user: rkeene, tags: trunk)
17:50
[c4916c27cd] ChromeOS: Slightly better PCSC-NaCl initialization and enabled debugging in all projects (user: rkeene, tags: trunk)
Changes

Modified build/chrome/cackey-chrome-init.cc from [e1139896d5] to [84155dbf3d].

    58     58   			if (command.AsString() == "init") {
    59     59   				if (message->HasKey("smartcardManagerAppId")) {
    60     60   					smartcardManagerAppId = strdup(message->Get("smartcardManagerAppId").AsString().c_str());
    61     61   				}
    62     62   
    63     63   				pcscNaClInit(this, corePointer, smartcardManagerAppId, "CACKey");
    64     64   
    65         -				free((void *) smartcardManagerAppId);
           65  +				if (smartcardManagerAppId) {
           66  +					free((void *) smartcardManagerAppId);
           67  +				}
    66     68   
    67     69   				reply->Set("status", "success");
    68     70   			} else if (command.AsString() == "listcertificates") {
    69     71   				numCertificates = cackey_chrome_listCertificates(&certificates);
    70     72   
    71     73   				certificatesPPArray.SetLength(numCertificates);
    72     74