File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -795,6 +795,23 @@ static int32_t ieee_segment(char *name, int *bits)
795795 define_label (name , seg -> index + 1 , 0L , false);
796796 ieee_seg_needs_update = NULL ;
797797
798+ /*
799+ * In commit 98578071b9d71ecaa2344dd9c185237c1765041e
800+ * we reworked labels significantly which in turn lead
801+ * to the case where seg->name = NULL here and we get
802+ * nil dereference in next segments definitions.
803+ *
804+ * Lets placate this case with explicit name setting
805+ * if labels engine didn't set it yet.
806+ *
807+ * FIXME: Need to revisit this moment if such fix doesn't
808+ * break anything but since IEEE 695 format is veeery
809+ * old I don't expect there are many users left. In worst
810+ * case this should only lead to a memory leak.
811+ */
812+ if (!seg -> name )
813+ seg -> name = nasm_strdup (name );
814+
798815 if (seg -> use32 )
799816 * bits = 32 ;
800817 else
You can’t perform that action at this time.
0 commit comments