https://github.com/torvalds/linux
Revision e51171019bb0e1f9fb57c25bd2e38ce652eaea27 authored by YOSHIFUJI Hideaki on 29 May 2008, 10:55:05 UTC, committed by YOSHIFUJI Hideaki on 04 June 2008, 19:02:30 UTC
Commit 7cbca67c073263c179f605bdbbdc565ab29d801d ("[IPV6]: Support
Source Address Selection API (RFC5014)") introduced NULL dereference
of asoc to sctp_v6_get_saddr in net/sctp/ipv6.c.
Pointed out by Johann Felix Soden <johfel@users.sourceforge.net>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
1 parent 7dccf1f
Raw File
Tip revision: e51171019bb0e1f9fb57c25bd2e38ce652eaea27 authored by YOSHIFUJI Hideaki on 29 May 2008, 10:55:05 UTC
[SCTP]: Fix NULL dereference of asoc.
Tip revision: e511710
bin2c.c
/*
 * Unloved program to convert a binary on stdin to a C include on stdout
 *
 * Jan 1999 Matt Mackall <mpm@selenic.com>
 *
 * This software may be used and distributed according to the terms
 * of the GNU General Public License, incorporated herein by reference.
 */

#include <stdio.h>

int main(int argc, char *argv[])
{
	int ch, total=0;

	if (argc > 1)
		printf("const char %s[] %s=\n",
			argv[1], argc > 2 ? argv[2] : "");

	do {
		printf("\t\"");
		while ((ch = getchar()) != EOF)
		{
			total++;
			printf("\\x%02x",ch);
			if (total % 16 == 0)
				break;
		}
		printf("\"\n");
	} while (ch != EOF);

	if (argc > 1)
		printf("\t;\n\nconst int %s_size = %d;\n", argv[1], total);

	return 0;
}
back to top