Index: /branches/eam_branches/ipp-20130509/Ohana/src/libdvo/src/dbCheckStack.c
===================================================================
--- /branches/eam_branches/ipp-20130509/Ohana/src/libdvo/src/dbCheckStack.c	(revision 35606)
+++ /branches/eam_branches/ipp-20130509/Ohana/src/libdvo/src/dbCheckStack.c	(revision 35607)
@@ -23,4 +23,21 @@
 
   for (i = 0; i < Nstack; i++) {
+
+    // BINARY operators
+    if ((stack[i].type >= DB_STACK_LOGIC) && (stack[i].type <= DB_STACK_POWER)) {
+      if (i < 2) {
+	gprint (GP_ERR, "syntax error for field %s (binary operator missing operand)\n", stack[i].name);
+	goto failure;
+      }
+    }
+
+    // UNARY operators
+    if (stack[i].type == DB_STACK_UNARY) {
+      if (i < 1) {
+	gprint (GP_ERR, "syntax error for field %s (unary operator missing operand)\n", stack[i].name);
+	goto failure;
+      }
+    }
+
     if (stack[i].type == DB_STACK_VALUE) {
 
