avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regression in r1436 ("Fix some out-of-bounds/uninitialized issues")


From: Joerg Wunsch
Subject: Re: Regression in r1436 ("Fix some out-of-bounds/uninitialized issues")
Date: Thu, 24 Jun 2021 23:04:09 +0200

As Sven Schwermer wrote:

> -  if (pgm->paged_load != NULL && mem->page_size != 0) {
> +  if (pgm->paged_load != NULL && mem->page_size != 0 && mem->paged) {

That looks like a good idea.

I guess it would probably also work like this:

if (pgm->paged_load != NULL && mem->page_size > 1) {

Ensuring the page size is minimum 1 was done to avoid possible
divisions by 0 and other potential bugs introduced by incorrect
avrdude.conf entries, but obviously, a memory with a page size of 1
should never be considered a "paged" one anyway.

Btw., what about paged_write?

-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]