]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aft.c
Merge branch 'maint'
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index a9bc006e110570a9e3551609f619e2062b24df73..c4558f2040ac67e0a613177b786438a038f5bcc5 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -2548,8 +2548,10 @@ static void com_setatt_callback(int fd, const struct osl_object *query)
                        break;
                p[len - 1] = '\0';
                ret = get_attribute_bitnum_by_name(p, &bitnum);
-               if (ret < 0)
+               if (ret < 0) {
+                       para_printf(&cad.pb, "attribute not found: %s\n", p);
                        goto out;
+               }
                if (c == '+')
                        cad.add_mask |= (1UL << bitnum);
                else
@@ -2559,7 +2561,8 @@ static void com_setatt_callback(int fd, const struct osl_object *query)
        if (!cad.add_mask && !cad.del_mask)
                goto out;
        pmd.patterns.data = p;
-       assert(p < (char *)query->data + query->size);
+       if (p >= (char *)query->data + query->size)
+               goto out;
        pmd.patterns.size = (char *)query->data + query->size - p;
        ret = for_each_matching_row(&pmd);
        if (ret < 0)