Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 18 Jul 2013 19:20:23 -0400
From: "Kirill Ternosvky" <>
Subject: musl regression tests

/* FILE: scanf-nullbyte-char.c
  Commit: ef5507867b59d19f21437970e87b5d0415c07b2e
  scanf should not append null byte after scanning %c
#include <stdio.h>
#include "test.h"

int main(void)
	char target_buffer[2] = { 'a', 'a' };
	char source_buffer = 'b';

	sscanf(&source_buffer, "%c", &target_buffer);

	if(target_buffer[1] != 'a' && !target_buffer[1])
		t_error("scanf stored null byte for %%c conversion\n");

	return 0;

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.