lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E8CBEDC.4010502@linux.vnet.ibm.com>
Date:	Thu, 06 Oct 2011 02:02:28 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	Thomas Tuttle <ttuttle@...omium.org>
CC:	linux-kernel@...r.kernel.org,
	Marco Stornelli <marco.stornelli@...il.com>
Subject: Re: [PATCH] ramoops: scripts/ramoops.c for extracting oopses

Hi,

On 10/05/2011 11:55 PM, Thomas Tuttle wrote:
> +static int print_records(int record)
> +{
> +	unsigned long mem_address, mem_size, record_size, num_records;
> +	FILE *mem;
> +	int i;
> +	int ret = 0;
> +
> +	read_long(RAMOOPS_PARAM "mem_address", &mem_address);
> +	read_long(RAMOOPS_PARAM "mem_size",    &mem_size);
> +	read_long(RAMOOPS_PARAM "record_size", &record_size);
> +	num_records = mem_size / record_size;
> +
> +	if (record != REC_LIST &&
> +	    (record < 0 || (unsigned long)record >= num_records)) {
> +		fprintf(stderr, "%s: record number %d out of range [0, %ld)\n",
> +			progn, record, num_records);
> +		return 1;
> +	}
> +
> +	buf = malloc(record_size);

Since buf is not declared, this fails program compilation.

> +	if (!buf) {
> +		fprintf(stderr, "%s: failed to allocate record buffer\n",
> +			progn);
> +		return 1;
> +	}
> +

-- 
Regards,
Srivatsa S. Bhat  <srivatsa.bhat@...ux.vnet.ibm.com>
Linux Technology Center,
IBM India Systems and Technology Lab
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ