Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#3477 closed defect (fixed)

i.ortho.photo segmentation fault

Reported by: lucadelu Owned by: grass-dev@…
Priority: major Milestone: 7.4.0
Component: Imagery Version: svn-releasebranch74
Keywords: i.ortho.photo Cc:
CPU: Unspecified Platform: All

Description

If I try to launch i.ortho.photo command I get segmentation fault error.

It seems that tosystem() is not working properly.

i.ortho.photo group=lsat7_2000 prod=i.group
Segmentation fault

Change History (8)

comment:1 Changed 21 months ago by ychemin

Yes confirmed that tosystem() fails to provide its claimed services.

comment:2 Changed 21 months ago by neteler

Just guessing, maybe the buffer is too small and needs to be larger?

--- menu.c	(revision 72067)
+++ menu.c	(working copy)
@@ -35,7 +35,7 @@
     char *desc_ortho_opt;
     char *moduletorun;
     const char *grname;
-    char tosystem[99];
+    char tosystem[1024];
     const char *to_system;
     int err=0;
 

comment:3 in reply to:  2 Changed 21 months ago by lucadelu

Replying to neteler:

Just guessing, maybe the buffer is too small and needs to be larger?

--- menu.c	(revision 72067)
+++ menu.c	(working copy)
@@ -35,7 +35,7 @@
     char *desc_ortho_opt;
     char *moduletorun;
     const char *grname;
-    char tosystem[99];
+    char tosystem[1024];
     const char *to_system;
     int err=0;
 

Did you try it?

For me still "Segmentation fault"

comment:4 Changed 21 months ago by ychemin

Resolution: fixed
Status: newclosed

rev r72075, should be fixed. The check for group validity was not needed. Please check and confirm

Last edited 21 months ago by neteler (previous) (diff)

comment:5 Changed 21 months ago by lucadelu

Confirmed, you can backport to 7.4 branch.

comment:6 Changed 21 months ago by neteler

In 72080:

i.ortho.photo: fix segfault (trunk, r72075); fixes #3477

comment:7 Changed 21 months ago by lucadelu

Can I backport also this r72066?

comment:8 in reply to:  7 Changed 21 months ago by neteler

Replying to lucadelu:

Can I backport also this r72066?

Done in r72094

Note: See TracTickets for help on using tickets.