File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -609,7 +609,7 @@ void AddArgToSpec(dali::OpSpec &spec, const daliArgDesc_t &arg) {
609609 std::vector<std::string> sv;
610610 sv.reserve (arg.size );
611611 for (int64_t i = 0 ; i < arg.size ; i++) {
612- if (!d[i])
612+ if (!d[i]) // the outer `if` prevents make_string in case of no error
613613 check_not_null (d[i], dali::make_string (" arg.arr[" , i, " ]" ));
614614 sv.emplace_back (d[i]);
615615 }
@@ -703,6 +703,10 @@ daliResult_t daliPipelineSetOutputs(
703703 const daliPipelineIODesc_t *outputs) {
704704 DALI_PROLOG ();
705705 auto pipe = ToPointer (pipeline);
706+ dali::c_api::CheckArg (num_outputs >= 0 , " `num_outputs` must not be negative" );
707+ if (num_outputs == 0 )
708+ return DALI_SUCCESS; // nothing to do
709+
706710 NOT_NULL (outputs);
707711 std::vector<dali::PipelineOutputDesc> descs;
708712 descs.reserve (num_outputs);
Original file line number Diff line number Diff line change @@ -380,7 +380,6 @@ typedef struct _DALIArgInputDesc {
380380 * - DALI_INT8..DALI_INT64 -> ivalue
381381 * - DALI_UINT8..DALI_UINT64 -> uvalue
382382 * - DALI_FLOAT -> fvalue
383- * - DALI_FLOAT64 -> dvalue
384383 * - DALI_BOOL -> ivalue (0 = false, non-zero = true)
385384 * - DALI_STRING -> str (NULL-terminated)
386385 *
@@ -390,7 +389,9 @@ typedef struct _DALIArgInputDesc {
390389 * - DALI_BOOL_VEC -> arr points to bool[], size = element count
391390 * - DALI_STRING_VEC -> arr points to const char*[], size = element count
392391 *
393- * For vector types, `arr` must be non-NULL and `size` must be >= 0.
392+ * Other types (including DALI_FLOAT64) are not supported.
393+ *
394+ * For vector types, `size` must be >= 0 and `arr` must be non-NULL when `size` > 0.
394395 */
395396typedef struct _DALIArgDesc {
396397 const char * name ;
You can’t perform that action at this time.
0 commit comments