mirror of https://github.com/XEphem/XEphem.git
fix(libastro): prevent buffer overflow in obj_description
It shouldn't happen (longest planet names in English are 7 char long, but just in case...).
This commit is contained in:
parent
0a1b50503b
commit
cc1ef1bfb4
|
|
@ -140,7 +140,7 @@ obj_description (Obj *op)
|
|||
return ("Planet");
|
||||
if (!biop)
|
||||
getBuiltInObjs (&biop);
|
||||
sprintf (nsstr, "Moon of %s", biop[op->pl_code].o_name);
|
||||
sprintf (nsstr, "Moon of %7s", biop[op->pl_code].o_name);
|
||||
return (nsstr);
|
||||
}
|
||||
case EARTHSAT:
|
||||
|
|
|
|||
Loading…
Reference in New Issue