diff --git a/libastro/constel.c b/libastro/constel.c index 221b3a2..9ccf5aa 100644 --- a/libastro/constel.c +++ b/libastro/constel.c @@ -1673,7 +1673,7 @@ cns_loadfigs (FILE *fp, char *msg) continue; /* ok, line looks interesting, look more carefully */ - if (sscanf (lp, "%d %s %s", &code, rastr, decstr) == 3) { + if (sscanf (lp, "%d %63s %63s", &code, rastr, decstr) == 3) { /* looks like a drawing line */ double ra, dec; diff --git a/libastro/magdecl.c b/libastro/magdecl.c index c8ff40b..66dc9e5 100644 --- a/libastro/magdecl.c +++ b/libastro/magdecl.c @@ -148,7 +148,7 @@ GEOMAG: c[0][0] = 0.0; cd[0][0] = 0.0; fgets(c_str, 80, wmmdat); - sscanf(c_str,"%f%s",&epoc,model); + sscanf(c_str,"%f%19s",&epoc,model); S3: fgets(c_str, 80, wmmdat); /* CHECK FOR LAST LINE IN FILE */ diff --git a/libastro/misc.c b/libastro/misc.c index 06a0672..264cc5f 100644 --- a/libastro/misc.c +++ b/libastro/misc.c @@ -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: