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