Opened 7 years ago

Closed 7 years ago

Last modified 7 years 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 by ychemin, 7 years ago

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

comment:2 by neteler, 7 years ago

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;
 

in reply to:  2 comment:3 by lucadelu, 7 years ago

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 by ychemin, 7 years ago

Resolution: fixed
Status: newclosed

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

Version 0, edited 7 years ago by ychemin (next)

comment:5 by lucadelu, 7 years ago

Confirmed, you can backport to 7.4 branch.

comment:6 by neteler, 7 years ago

In 72080:

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

comment:7 by lucadelu, 7 years ago

Can I backport also this r72066?

in reply to:  7 comment:8 by neteler, 7 years ago

Replying to lucadelu:

Can I backport also this r72066?

Done in r72094

Note: See TracTickets for help on using tickets.