Skip to content

Suspicious places in the application source code #334

@Yugend

Description

@Yugend

I was looking through the source code of sudo and found four suspicious places:

  1. The first one is in the plugins/sudoers/sudoreplay.c file, 634 line. The second statement "if" looks strange, as if it's a misprint.
  2. The next place is in the same directory in tsdump.c file, 223, 228 lines. The 'first' variable is initialized True value, does not change in any way, and is then used when checking in the printf function call.
  3. The third one is in the lib/protobuf-c/protobuf.c file, 2572 and 2574 lines. the pointer 'pstr' is checked twice for NULL, probably the second time it is not necessary..
  4. And the last one I found in the plugins/sample/sample_plugin.c file, 162, 172 lines. In line 172 the pointer 'cp' is used which can be NULL if the 'strchr' function does not find a colon in the 'path' variable. As far as I know, this can lead to undefined behavior.

Perhaps there is some sense in this, but I did not understand it. In that case, I'm sorry to disturb you.


sid@itb.spb.ru | "Innovative Technologies in Business" LLC | https://www.itb.spb.ru/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions