Fix unsafe buffer usage in ui/events/ozone/device/udev/device_manager_udev.cc [chromium/src : main]

0 views
Skip to first unread message

Zekun Jiang (Gerrit)

unread,
Feb 4, 2026, 7:16:18 PMFeb 4
to Arthur Sonzogni, Harry Cutts, Chromium LUCI CQ, chromium...@chromium.org, ozone-...@chromium.org
Attention needed from Harry Cutts

Zekun Jiang added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Zekun Jiang . resolved

the al patch looks good so sending as is

Open in Gerrit

Related details

Attention is currently required from:
  • Harry Cutts
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I29e20706a2e65898880fdd7ce0728fffcb159100
Gerrit-Change-Number: 7105968
Gerrit-PatchSet: 3
Gerrit-Owner: Arthur Sonzogni <arthurs...@chromium.org>
Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
Gerrit-Reviewer: Harry Cutts <hcu...@chromium.org>
Gerrit-CC: Zekun Jiang <zekun...@google.com>
Gerrit-Attention: Harry Cutts <hcu...@chromium.org>
Gerrit-Comment-Date: Thu, 05 Feb 2026 00:16:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Harry Cutts (Gerrit)

unread,
Feb 5, 2026, 5:30:37 AMFeb 5
to Zekun Jiang, Arthur Sonzogni, Harry Cutts, Chromium LUCI CQ, chromium...@chromium.org, ozone-...@chromium.org
Attention needed from Arthur Sonzogni and Zekun Jiang

Harry Cutts added 1 comment

File ui/events/ozone/device/udev/device_manager_udev.cc
Line 138, Patchset 3 (Latest): if (std::string_view(subsystem) == "input" &&
Harry Cutts . unresolved

Could we rename `subsystem` to `subsystem_cstr` and then add a `std::string_view` variable, like we do for `path`, rather than constructing a new `string_view` for each branch of the `if`? (Similarly for `action`.)

Alternatively, have you considered doing a bigger refactor to make `device::udev_device_get_property_value` return a nice C++ string type (e.g. `std::optional<std::string_view>`)?

Open in Gerrit

Related details

Attention is currently required from:
  • Arthur Sonzogni
  • Zekun Jiang
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I29e20706a2e65898880fdd7ce0728fffcb159100
    Gerrit-Change-Number: 7105968
    Gerrit-PatchSet: 3
    Gerrit-Owner: Arthur Sonzogni <arthurs...@chromium.org>
    Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
    Gerrit-Reviewer: Harry Cutts <hcu...@chromium.org>
    Gerrit-CC: Zekun Jiang <zekun...@google.com>
    Gerrit-Attention: Zekun Jiang <zekun...@google.com>
    Gerrit-Attention: Arthur Sonzogni <arthurs...@chromium.org>
    Gerrit-Comment-Date: Thu, 05 Feb 2026 10:30:21 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Zekun Jiang (Gerrit)

    unread,
    Feb 5, 2026, 12:26:25 PMFeb 5
    to Arthur Sonzogni, Harry Cutts, Chromium LUCI CQ, chromium...@chromium.org, ozone-...@chromium.org
    Attention needed from Arthur Sonzogni and Harry Cutts

    Zekun Jiang added 1 comment

    File ui/events/ozone/device/udev/device_manager_udev.cc
    Line 138, Patchset 3 (Latest): if (std::string_view(subsystem) == "input" &&
    Harry Cutts . unresolved

    Could we rename `subsystem` to `subsystem_cstr` and then add a `std::string_view` variable, like we do for `path`, rather than constructing a new `string_view` for each branch of the `if`? (Similarly for `action`.)

    Alternatively, have you considered doing a bigger refactor to make `device::udev_device_get_property_value` return a nice C++ string type (e.g. `std::optional<std::string_view>`)?

    Zekun Jiang

    Sure thing - I'll look into doing a bigger refactor. going to mark this wip for now

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Arthur Sonzogni
    • Harry Cutts
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I29e20706a2e65898880fdd7ce0728fffcb159100
    Gerrit-Change-Number: 7105968
    Gerrit-PatchSet: 3
    Gerrit-Owner: Arthur Sonzogni <arthurs...@chromium.org>
    Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
    Gerrit-Reviewer: Harry Cutts <hcu...@chromium.org>
    Gerrit-CC: Zekun Jiang <zekun...@google.com>
    Gerrit-Attention: Harry Cutts <hcu...@chromium.org>
    Gerrit-Attention: Arthur Sonzogni <arthurs...@chromium.org>
    Gerrit-Comment-Date: Thu, 05 Feb 2026 17:26:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Harry Cutts <hcu...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Zekun Jiang (Gerrit)

    unread,
    Feb 10, 2026, 4:31:11 PM (10 days ago) Feb 10
    to Arthur Sonzogni, Matt Reynolds, Harry Cutts, Chromium LUCI CQ, chromium...@chromium.org, ozone-...@chromium.org
    Attention needed from Harry Cutts and Matt Reynolds

    Zekun Jiang added 1 comment

    File ui/events/ozone/device/udev/device_manager_udev.cc
    Line 138, Patchset 3: if (std::string_view(subsystem) == "input" &&
    Harry Cutts . resolved

    Could we rename `subsystem` to `subsystem_cstr` and then add a `std::string_view` variable, like we do for `path`, rather than constructing a new `string_view` for each branch of the `if`? (Similarly for `action`.)

    Alternatively, have you considered doing a bigger refactor to make `device::udev_device_get_property_value` return a nice C++ string type (e.g. `std::optional<std::string_view>`)?

    Zekun Jiang

    Sure thing - I'll look into doing a bigger refactor. going to mark this wip for now

    Zekun Jiang

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Harry Cutts
    • Matt Reynolds
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I29e20706a2e65898880fdd7ce0728fffcb159100
      Gerrit-Change-Number: 7105968
      Gerrit-PatchSet: 4
      Gerrit-Owner: Arthur Sonzogni <arthurs...@chromium.org>
      Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
      Gerrit-Reviewer: Harry Cutts <hcu...@chromium.org>
      Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
      Gerrit-Attention: Harry Cutts <hcu...@chromium.org>
      Gerrit-Attention: Matt Reynolds <mattre...@chromium.org>
      Gerrit-Comment-Date: Tue, 10 Feb 2026 21:31:03 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Harry Cutts <hcu...@chromium.org>
      Comment-In-Reply-To: Zekun Jiang <zekun...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Matt Reynolds (Gerrit)

      unread,
      Feb 10, 2026, 8:00:05 PM (10 days ago) Feb 10
      to Zekun Jiang, Arthur Sonzogni, Harry Cutts, Chromium LUCI CQ, chromium...@chromium.org, ozone-...@chromium.org
      Attention needed from Arthur Sonzogni, Harry Cutts and Zekun Jiang

      Matt Reynolds voted and added 1 comment

      Votes added by Matt Reynolds

      Code-Review+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 5 (Latest):
      Matt Reynolds . resolved

      lgtm

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Arthur Sonzogni
      • Harry Cutts
      • Zekun Jiang
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I29e20706a2e65898880fdd7ce0728fffcb159100
        Gerrit-Change-Number: 7105968
        Gerrit-PatchSet: 5
        Gerrit-Owner: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Reviewer: Harry Cutts <hcu...@chromium.org>
        Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
        Gerrit-Attention: Harry Cutts <hcu...@chromium.org>
        Gerrit-Attention: Zekun Jiang <zekun...@google.com>
        Gerrit-Attention: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Comment-Date: Wed, 11 Feb 2026 00:59:55 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Harry Cutts (Gerrit)

        unread,
        Feb 11, 2026, 5:54:10 AM (9 days ago) Feb 11
        to Zekun Jiang, Arthur Sonzogni, Harry Cutts, Matt Reynolds, Chromium LUCI CQ, chromium...@chromium.org, ozone-...@chromium.org
        Attention needed from Arthur Sonzogni and Zekun Jiang

        Harry Cutts voted and added 1 comment

        Votes added by Harry Cutts

        Code-Review+1

        1 comment

        File ui/events/ozone/device/udev/device_manager_udev.cc
        Line 138, Patchset 3: if (std::string_view(subsystem) == "input" &&
        Harry Cutts . resolved

        Could we rename `subsystem` to `subsystem_cstr` and then add a `std::string_view` variable, like we do for `path`, rather than constructing a new `string_view` for each branch of the `if`? (Similarly for `action`.)

        Alternatively, have you considered doing a bigger refactor to make `device::udev_device_get_property_value` return a nice C++ string type (e.g. `std::optional<std::string_view>`)?

        Zekun Jiang

        Sure thing - I'll look into doing a bigger refactor. going to mark this wip for now

        Zekun Jiang

        Done

        Harry Cutts

        Much nicer, thanks!

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Arthur Sonzogni
        • Zekun Jiang
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I29e20706a2e65898880fdd7ce0728fffcb159100
        Gerrit-Change-Number: 7105968
        Gerrit-PatchSet: 5
        Gerrit-Owner: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Reviewer: Harry Cutts <hcu...@chromium.org>
        Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
        Gerrit-Attention: Zekun Jiang <zekun...@google.com>
        Gerrit-Attention: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Comment-Date: Wed, 11 Feb 2026 10:53:56 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Zekun Jiang (Gerrit)

        unread,
        Feb 11, 2026, 12:19:51 PM (9 days ago) Feb 11
        to Arthur Sonzogni, Harry Cutts, Matt Reynolds, Chromium LUCI CQ, chromium...@chromium.org, ozone-...@chromium.org
        Attention needed from Arthur Sonzogni

        Zekun Jiang voted Commit-Queue+2

        Commit-Queue+2
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Arthur Sonzogni
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I29e20706a2e65898880fdd7ce0728fffcb159100
        Gerrit-Change-Number: 7105968
        Gerrit-PatchSet: 5
        Gerrit-Owner: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Reviewer: Harry Cutts <hcu...@chromium.org>
        Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
        Gerrit-Reviewer: Zekun Jiang <zekun...@google.com>
        Gerrit-Attention: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Comment-Date: Wed, 11 Feb 2026 17:19:40 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Feb 11, 2026, 12:23:04 PM (9 days ago) Feb 11
        to Zekun Jiang, Arthur Sonzogni, Harry Cutts, Matt Reynolds, chromium...@chromium.org, ozone-...@chromium.org

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        Fix unsafe buffer usage in ui/events/ozone/device/udev/device_manager_udev.cc

        Switched to functions that return std::string instead of char* in device_manager_udev.cc.

        Initial patchset generated by headless gemini-cli using:
        //agents/prompts/projects/spanification/run.py
        Fixed: 457304339
        Change-Id: I29e20706a2e65898880fdd7ce0728fffcb159100
        Reviewed-by: Matt Reynolds <mattre...@chromium.org>
        Commit-Queue: Zekun Jiang <zekun...@google.com>
        Reviewed-by: Harry Cutts <hcu...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1583310}
        Files:
        • M device/udev_linux/udev.cc
        • M device/udev_linux/udev.h
        • M ui/events/ozone/device/udev/device_manager_udev.cc
        Change size: S
        Delta: 3 files changed, 18 insertions(+), 11 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Matt Reynolds, +1 by Harry Cutts
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I29e20706a2e65898880fdd7ce0728fffcb159100
        Gerrit-Change-Number: 7105968
        Gerrit-PatchSet: 6
        Gerrit-Owner: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Reviewer: Arthur Sonzogni <arthurs...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Harry Cutts <hcu...@chromium.org>
        Gerrit-Reviewer: Matt Reynolds <mattre...@chromium.org>
        Gerrit-Reviewer: Zekun Jiang <zekun...@google.com>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages