Bug #1111

conv: Endless while-loop when idec or jdec=0

Added by Lukas 5 months ago. Updated 5 months ago.

Status:ResolvedStart date:2017-06-13
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Affected version:5.x-svn Platform:

Description

If idec or jdec is accidentally set to 0, the program doesn't terminate as idec/jdec is used as loop increment.

Would be good if theses values are caught before entering the while-loop.

Example (will run forever):
conv 1 0 filters/gauss5x5 input.PRM test.grd

This issue might be related to issue #1064 (https://gmt.soest.hawaii.edu/issues/1064) as intf_tops.csh calls filter.csh which passes sometimes 0 values as idec jdec to conv (idec/jdec are set by integer division)

[Version: 5.x Compiled after commit r463 (2017-05-30)]

History

#1 Updated by Xiaopeng 5 months ago

  • Status changed from New to Resolved

added a line in conv.c to check idec and jdec to be positve

Also available in: Atom PDF