Skip to content

Multibyte patterns in scanf are handled incorrectly #761

@schuessf

Description

@schuessf

The following program is incorrect, as scanf reads 2 bytes from stdin and writes them to p:

int main() {
  char* p = "Hello";
  scanf("%2c", p);
  if (p[1] != 'e') reach_error();
}

However, ULTIMATE currently report this program as correct, as only one single byte is written, since the patern is simply ignored.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions