• Sorin Jianu's avatar
    Handle an ill formed response from UpdateClient::CrxDataCallback. · a5d25fbe
    Sorin Jianu authored
    There could be executions path in the code where early returns in
    the callback implementations return an empty vector instead of
    a vector of CrxComponent of the same size as the input parameter
    of the callback.
    
    When this occurs, the original code indexes out of bounds and crashes.
    
    With the fix, if the callback returns fewer values than the number of
    components checked for updates, the UpdateClient::Update call is
    rejected by the update engine, and completed with a specific error code.
    
    Bug: 1144880
    Change-Id: If45910c7c9ea0ca940b2d5a3d936b96a31d9c684
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2518001Reviewed-by: default avatarJoshua Pawlicki <waffles@chromium.org>
    Commit-Queue: Sorin Jianu <sorin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#823985}
    a5d25fbe
ping_manager_unittest.cc 19.6 KB