Changeset: 6fb6aa487190 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6fb6aa487190
Modified Files:
        sql/backends/monet5/vaults/sambam/sambam.c
Branch: samloader
Log Message:

Work around compiler complaining about out-of-bounds error.


diffs (12 lines):

diff --git a/sql/backends/monet5/vaults/sambam/sambam.c 
b/sql/backends/monet5/vaults/sambam/sambam.c
--- a/sql/backends/monet5/vaults/sambam/sambam.c
+++ b/sql/backends/monet5/vaults/sambam/sambam.c
@@ -386,7 +386,7 @@ sam_query(int caller, mvc *sql, sql_subf
                                        pos += printauxdata(buf + pos, 
sizeof(buf) - pos, aux_type, -1, aux);
                                        aux = bam_aux_next(bamdata, aux);
                                }
-                               buf[pos] = '\0';
+                               buf[pos >= sizeof(buf) ? sizeof(buf) - 1 : pos] 
= '\0';
                                gdkret = bunfastapp(colmetadata[11].bat, (void 
*) (pos > 0 ? buf : str_nil));
                        }
 
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to