[Groonga-commit] groonga/groonga at fbf7218 [master] grn_table_cursor_open: add error check of grn_table_size()

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Sep 12 16:58:15 JST 2018


Kouhei Sutou	2018-09-12 16:58:15 +0900 (Wed, 12 Sep 2018)

  Revision: fbf7218e4358c02fd0db5d9aa163dc48140b76bb
  https://github.com/groonga/groonga/commit/fbf7218e4358c02fd0db5d9aa163dc48140b76bb

  Message:
    grn_table_cursor_open: add error check of grn_table_size()

  Modified files:
    lib/db.c

  Modified: lib/db.c (+3 -0)
===================================================================
--- lib/db.c    2018-09-12 16:57:27 +0900 (263ff8954)
+++ lib/db.c    2018-09-12 16:58:15 +0900 (2ba5b6494)
@@ -2587,6 +2587,9 @@ grn_table_cursor_open(grn_ctx *ctx, grn_obj *table,
   if (!table) { return tc; }
   GRN_API_ENTER;
   table_size = grn_table_size(ctx, table);
+  if (ctx->rc != GRN_SUCCESS) {
+    GRN_API_RETURN(NULL);
+  }
   if (flags & GRN_CURSOR_PREFIX) {
     if (offset < 0) {
       ERR(GRN_TOO_SMALL_OFFSET,
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180912/a7f691d0/attachment.htm 



More information about the Groonga-commit mailing list
Back to archive index